[INFO] Création du rôle

This commit is contained in:
2023-04-13 09:25:26 +02:00
parent b28b95d2f4
commit 221a372703
7 changed files with 193 additions and 3 deletions

20
templates/wgN.j2 Normal file
View File

@@ -0,0 +1,20 @@
# {{ ansible_managed }}
[Interface]
{% if item.listen_port is defined %}
ListenPort = {{ item.listen_port }}
{% endif %}
PrivateKey = {{ item.privkey }}
Address = {{ item.addresses | join(', ') }}
{% for peer in item.peers %}
[Peer]
# {{ peer.name }}
PublicKey = {{ peer.pubkey }}
Endpoint = {{ peer.endpoint }}
AllowedIPs = {{ peer.allowed_ips | join(', ') }}
{% if peer.persistent_keepalive is defined %}
PersistentKeepalive = {{ peer.persistent_keepalive }}
{% endif %}
{% endfor %}