diff --git a/templates/wg.conf.j2 b/templates/wg.conf.j2 index 0ab144b..ff05e19 100644 --- a/templates/wg.conf.j2 +++ b/templates/wg.conf.j2 @@ -39,7 +39,7 @@ PostDown = {{ wg_postdown }} {% if hostvars[inventory_hostname].wireguard_save_config is defined %} SaveConfig = true {% endif %} -{% for host in ansible_play_hosts %} +{% for host in ansible_play_hosts_all %} {% if host != inventory_hostname %} [Peer]