mirror of
https://github.com/fscotto/infra.git
synced 2026-09-27 19:03:47 +00:00
Document Atlas backend phase one and WireGuard deployment
This commit is contained in:
25
ansible/roles/wireguard_overlay/templates/wg.conf.j2
Normal file
25
ansible/roles/wireguard_overlay/templates/wg.conf.j2
Normal file
@@ -0,0 +1,25 @@
|
||||
# Managed by Ansible. Do not edit manually.
|
||||
[Interface]
|
||||
Address = {{ wireguard_address }}
|
||||
PrivateKey = {{ wireguard_private_key_material.content | b64decode | trim }}
|
||||
MTU = {{ wireguard_mtu }}
|
||||
SaveConfig = false
|
||||
{% if wireguard_listen_port | int > 0 %}
|
||||
ListenPort = {{ wireguard_listen_port }}
|
||||
{% endif %}
|
||||
|
||||
{% for peer in wireguard_peers %}
|
||||
[Peer]
|
||||
# {{ peer.name }}
|
||||
PublicKey = {{ hostvars[peer.host].wireguard_public_key }}
|
||||
AllowedIPs = {{ peer.allowed_ips | join(', ') }}
|
||||
{% if peer.endpoint is defined %}
|
||||
Endpoint = {{ peer.endpoint }}
|
||||
{% endif %}
|
||||
{% if peer.persistent_keepalive | default(0) | int > 0 %}
|
||||
PersistentKeepalive = {{ peer.persistent_keepalive }}
|
||||
{% endif %}
|
||||
{% if not loop.last %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user