2024-01-17 17:45:49 +00:00
|
|
|
[Interface]
|
|
|
|
PrivateKey = {{ lookup('ansible.builtin.ini', 'private_key section=wireguard file=secrets/' + inventory_hostname + '.ini') }}
|
|
|
|
ListenPort = 51822
|
2024-02-04 00:16:30 +00:00
|
|
|
Address = {{ dns_wg_ip }}
|
2024-01-17 17:45:49 +00:00
|
|
|
|
|
|
|
{% for host in hostvars %}
|
|
|
|
{% if host != inventory_hostname %}
|
|
|
|
# {{ host }}
|
|
|
|
[Peer]
|
2024-02-04 00:16:30 +00:00
|
|
|
Endpoint = {{ hostvars[host].dns_wg_endpoint|default(host) }}:51822
|
|
|
|
PublicKey = {{ hostvars[host].dns_wg_pubkey }}
|
|
|
|
AllowedIPs = {{ hostvars[host].dns_wg_ip }}
|
2024-01-17 17:45:49 +00:00
|
|
|
|
|
|
|
{% endif %}{% endfor %}
|