Fix regexp for wireguard-IP-detection.
This commit is contained in:
parent
4863caf526
commit
bb3acdba6d
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@
|
|||
|
||||
- name: Set facts wg_ip
|
||||
ansible.builtin.set_fact:
|
||||
wg_ip: "{{ wg_serverconfig.stdout | regex_search('AllowedIPs = (0-9.)+/32', '\\1') }}"
|
||||
wg_ip: "{{ wg_serverconfig.stdout | regex_search('AllowedIPs = ([0-9.]+)/32', '\\1', multiline=True) | first }}"
|
||||
when: wg_serverconfig.rc == 0 and wg_ip is not defined
|
||||
|
||||
- name: Check if Wireguard exists on client
|
||||
|
|
Loading…
Add table
Reference in a new issue