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
|
- name: Configure peers hosts file entry
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/hosts
|
path: /etc/hosts
|
||||||
regexp: "^{{ item['AllowedIPs'] | regex_replace('/.*$', '')}} "
|
regexp: "^{{ hostvars[item]['AllowedIPs'] | regex_replace('/.*$', '')}} "
|
||||||
line: "{{ item['AllowedIPs'] | regex_replace('/.*$', '')}} {{ item['name'] }}.{{ vpn_domain }}"
|
line: "{{ hostvars[item]['AllowedIPs'] | regex_replace('/.*$', '')}} {{ item }}.{{ vpn_domain }}"
|
||||||
backup: true
|
backup: true
|
||||||
create: true
|
create: true
|
||||||
loop: "{{ groups['wireguard_clients'] }}"
|
loop: "{{ groups['wireguard_clients'] }}"
|
||||||
|
|
Loading…
Reference in a new issue