fix hots for router

This commit is contained in:
Antonio J. Delgado 2023-10-06 19:30:38 +03:00
parent f72286bc30
commit 5a8c281342

View file

@ -64,8 +64,8 @@
- name: Configure peers hosts file entry
lineinfile:
path: /etc/hosts
regexp: "^{{ hostvars[item]['AllowedIPs'] | regex_replace('/.*$', '')}} "
line: "{{ hostvars[item]['AllowedIPs'] | regex_replace('/.*$', '')}} {{ item }}.{{ vpn_domain }}"
regexp: "^{{ hostvars[item]['wg_address'] | regex_replace('/.*$', '')}} "
line: "{{ hostvars[item]['wg_address'] | regex_replace('/.*$', '')}} {{ item }}.{{ vpn_domain }}"
backup: true
create: true
loop: "{{ groups['wireguard_clients'] }}"