collection of ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

16 lines
378 B

[Interface]
PrivateKey = {{ wg_private_key.stdout_lines[0] }}
ListenPort = {{ wg_port }}
{% if wg_peers is defined %}
{% for wg_peer in wg_peers %}
[Peer]
PublicKey = {{ wg_peer.pubkey }}
{% for net in wg_peer.allowed_nets %}
AllowedIPs = {{ net }}
{% endfor %}
{% if wg_peer.ip is defined %}
Endpoint = {{ wg_peer.ip }}:{{ wg_peer.port }}
{% endif %}
{% endfor %}
{% endif %}