diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2023-10-09 12:05:54 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2023-10-09 12:05:54 +0200 |
commit | bf4bc2e55371f6e0d5aae5fed2f5814955dd644c (patch) | |
tree | 79b26cdf61af3b08cc40af7c8e45b1aa1652748e | |
parent | aa03c24a0e107e25c73d561a606552794cd8478e (diff) | |
download | infra-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.yml | 2 |
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] |