Add Wireguard playbook and first commit
This commit is contained in:
12
roles/homelab/wireguard/templates/wg0.conf.j2
Normal file
12
roles/homelab/wireguard/templates/wg0.conf.j2
Normal file
@@ -0,0 +1,12 @@
|
||||
[Interface]
|
||||
Address = {{ wireguard_address }}/24
|
||||
ListenPort = {{ wireguard_port }}
|
||||
PrivateKey = {{ wg_server_privkey_content.content | b64decode | trim }}
|
||||
|
||||
{% for peer in wireguard_clients %}
|
||||
{% set peer_pubkey = peer_pubkey.results[loop.index0].stdout %}
|
||||
#Peer: {{ peer.name }}
|
||||
[Peer]
|
||||
PublicKey = {{ peer_pubkey }}
|
||||
AllowedIPs = {{ peer.address }}
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user