26 lines
575 B
Django/Jinja
26 lines
575 B
Django/Jinja
{{ ansible_header | comment }}
|
|
|
|
[Interface]
|
|
{% if item.addresses is defined %}
|
|
Address = {{ item.addresses | join(", ") }}
|
|
{% endif %}
|
|
{% if item.listen_port is defined %}
|
|
ListenPort = {{ item.listen_port }}
|
|
{% endif %}
|
|
PrivateKey = {{ item.private_key }}
|
|
|
|
{% if item.post_up is defined %}
|
|
PostUp = {{ item.post_up }}
|
|
{% endif %}
|
|
{% if item.post_down is defined %}
|
|
PostDown = {{ item.post_down }}
|
|
{% endif %}
|
|
|
|
{% for peer in item.peers %}
|
|
[Peer]
|
|
PublicKey = {{ peer.public_key }}
|
|
AllowedIPs = {{ peer.allowed_ips | join(", ") }}
|
|
Endpoint = {{ peer.endpoint }}
|
|
|
|
{% endfor -%}
|