summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2023-10-09 12:05:54 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2023-10-09 12:05:54 +0200
commitbf4bc2e55371f6e0d5aae5fed2f5814955dd644c (patch)
tree79b26cdf61af3b08cc40af7c8e45b1aa1652748e
parentaa03c24a0e107e25c73d561a606552794cd8478e (diff)
downloadinfra-bf4bc2e55371f6e0d5aae5fed2f5814955dd644c.tar.gz
infra-bf4bc2e55371f6e0d5aae5fed2f5814955dd644c.tar.bz2
infra-bf4bc2e55371f6e0d5aae5fed2f5814955dd644c.tar.xz
infra-bf4bc2e55371f6e0d5aae5fed2f5814955dd644c.zip
wireguard: skip self
-rw-r--r--ansible/roles/wireguard/tasks/main.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/ansible/roles/wireguard/tasks/main.yml b/ansible/roles/wireguard/tasks/main.yml
index 193b549..67529bd 100644
--- a/ansible/roles/wireguard/tasks/main.yml
+++ b/ansible/roles/wireguard/tasks/main.yml
@@ -71,7 +71,7 @@
{% for hostname in wg_net.hosts|sort %}
{% set host = wg_net.hosts[hostname] %}
{% set present = not (host.state is defined) or host.state == 'present' %}
- {% if present and (all_peers or host.endpoint is defined) %}
+ {% if present and (all_peers or host.endpoint is defined) and (hostname != inventory_hostname) %}
# {{ hostname }}
[WireGuardPeer]