fix hosts config
This commit is contained in:
parent
bf7ede48c4
commit
0ed9893687
1 changed files with 2 additions and 2 deletions
|
@ -64,8 +64,8 @@
|
|||
- name: Configure peers hosts file entry
|
||||
lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: "^{{ item['AllowedIPs'] | regex_replace('/.*$', '')}} "
|
||||
line: "{{ item['AllowedIPs'] | regex_replace('/.*$', '')}} {{ item['name'] }}.{{ vpn_domain }}"
|
||||
regexp: "^{{ hostvars[item]['AllowedIPs'] | regex_replace('/.*$', '')}} "
|
||||
line: "{{ hostvars[item]['AllowedIPs'] | regex_replace('/.*$', '')}} {{ item }}.{{ vpn_domain }}"
|
||||
backup: true
|
||||
create: true
|
||||
loop: "{{ groups['wireguard_clients'] }}"
|
||||
|
|
Loading…
Reference in a new issue