remove unnecessary whitespace from wg.conf template
This commit is contained in:
parent
d1ed058fa8
commit
fbc79beb72
|
@ -40,31 +40,31 @@ PostDown = {{ wg_postdown }}
|
||||||
SaveConfig = true
|
SaveConfig = true
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for host in ansible_play_hosts_all %}
|
{% for host in ansible_play_hosts_all %}
|
||||||
{% if host != inventory_hostname %}
|
{% if host != inventory_hostname %}
|
||||||
|
|
||||||
[Peer]
|
[Peer]
|
||||||
# {{ host }}
|
# {{ host }}
|
||||||
PublicKey = {{hostvars[host].public_key}}
|
PublicKey = {{hostvars[host].public_key}}
|
||||||
{% if hostvars[host].wireguard_allowed_ips is defined %}
|
{% if hostvars[host].wireguard_allowed_ips is defined %}
|
||||||
AllowedIPs = {{hostvars[host].wireguard_allowed_ips}}
|
AllowedIPs = {{hostvars[host].wireguard_allowed_ips}}
|
||||||
{% else %}
|
{% else %}
|
||||||
AllowedIPs = {{hostvars[host].wireguard_ip}}/32
|
AllowedIPs = {{hostvars[host].wireguard_ip}}/32
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if hostvars[host].wireguard_persistent_keepalive is defined %}
|
{% if hostvars[host].wireguard_persistent_keepalive is defined %}
|
||||||
PersistentKeepalive = {{hostvars[host].wireguard_persistent_keepalive}}
|
PersistentKeepalive = {{hostvars[host].wireguard_persistent_keepalive}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if hostvars[host].wireguard_port is defined and hostvars[host].wireguard_port is number %}
|
{% if hostvars[host].wireguard_port is defined and hostvars[host].wireguard_port is number %}
|
||||||
{% if hostvars[host].wireguard_endpoint is defined and hostvars[host].wireguard_endpoint != "" %}
|
{% if hostvars[host].wireguard_endpoint is defined and hostvars[host].wireguard_endpoint != "" %}
|
||||||
Endpoint = {{hostvars[host].wireguard_endpoint}}:{{hostvars[host].wireguard_port}}
|
Endpoint = {{hostvars[host].wireguard_endpoint}}:{{hostvars[host].wireguard_port}}
|
||||||
{% else %}
|
{% else %}
|
||||||
Endpoint = {{host}}:{{hostvars[host].wireguard_port}}
|
Endpoint = {{host}}:{{hostvars[host].wireguard_port}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif hostvars[host].wireguard_endpoint is defined and hostvars[host].wireguard_endpoint != "" %}
|
{% elif hostvars[host].wireguard_endpoint is defined and hostvars[host].wireguard_endpoint != "" %}
|
||||||
Endpoint = {{hostvars[host].wireguard_endpoint}}:{{wireguard_port}}
|
Endpoint = {{hostvars[host].wireguard_endpoint}}:{{wireguard_port}}
|
||||||
{% elif hostvars[host].wireguard_endpoint == "" %}
|
{% elif hostvars[host].wireguard_endpoint == "" %}
|
||||||
# No endpoint defined for this peer
|
# No endpoint defined for this peer
|
||||||
{% else %}
|
{% else %}
|
||||||
Endpoint = {{host}}:{{wireguard_port}}
|
Endpoint = {{host}}:{{wireguard_port}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Reference in a new issue