From 0dff9058efab1f3e24a4efa3c9f8354646699414 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sun, 19 May 2024 13:51:44 +0300 Subject: [PATCH] Add default allowedips --- tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index f8a3e3b..55ae9a7 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -76,7 +76,7 @@ lineinfile: path: /etc/hosts regexp: "^{{ hostvars[item]['AllowedIPs'] | regex_replace('/.*$', '')}} " - line: "{{ hostvars[item]['AllowedIPs'] | regex_replace('/.*$', '')}} {{ item }}.{{ vpn_domain }}" + line: "{{ hostvars[item]['AllowedIPs'] | default('') | regex_replace('/.*$', '')}} {{ item }}.{{ vpn_domain }}" backup: true create: true loop: "{{ groups['wireguard_clients'] }}"