don't add peer for localhost
This commit is contained in:
parent
e1c652eb5c
commit
32a6bb6777
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ Address = {% for item in wireguard_peers %}{% if item['name'] == inventory_hostn
|
|||
PrivateKey = {{ private_key }}
|
||||
ListenPort = {{ listenport }}
|
||||
|
||||
{% for item in wireguard_peers %}
|
||||
{% for item in wireguard_peers %}{% if item['name'] != inventory_hostname %}
|
||||
|
||||
# Peer name: {{ item.name }}
|
||||
[Peer]
|
||||
|
@ -13,4 +13,4 @@ AllowedIPs = {{ item.AllowedIPs }}
|
|||
{% if item.EndPointIP is defined and item.EndPointIP != '' %}
|
||||
EndPoint = {{ item.EndPointIP }}:{{ listenport }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue