Skip to content

Commit

Permalink
issue #85 - call reconfigure wireguard handler
Browse files Browse the repository at this point in the history
  • Loading branch information
zerwes committed Jul 28, 2024
1 parent 0796432 commit 8fdc2df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions tasks/wireguard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
xpath: "/opnsense/OPNsense/wireguard/general/{{ item.key }}"
value: "{{ item.value }}"
pretty_print: true
notify: reconfigure wireguard
with_dict:
- "{{ opn_wireguard.general | default({}) }}"

Expand Down
2 changes: 2 additions & 0 deletions tasks/wireguardclients.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xpath: "/opnsense/OPNsense/wireguard/client/clients/client[@uuid='{{ uuid }}']/{{ item.key }}"
value: "{{ item.value }}"
pretty_print: true
notify: reconfigure wireguard
when:
- item.key not in ['tunneladdress'] or item.value is string
with_dict:
Expand All @@ -19,6 +20,7 @@
xpath: "/opnsense/OPNsense/wireguard/client/clients/client[@uuid='{{ uuid }}']/{{ item.key }}"
value: "{{ item.value | join(',') }}"
pretty_print: true
notify: reconfigure wireguard
when:
- item.key in ['tunneladdress'] and not item.value is string
with_dict:
Expand Down
2 changes: 2 additions & 0 deletions tasks/wireguardservers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xpath: "/opnsense/OPNsense/wireguard/server/servers/server[@uuid='{{ uuid }}']/{{ item.key }}"
value: "{{ item.value }}"
pretty_print: true
notify: reconfigure wireguard
when:
- item.key not in ['tunneladdress', 'peers'] or item.value is string
with_dict:
Expand All @@ -19,6 +20,7 @@
xpath: "/opnsense/OPNsense/wireguard/server/servers/server[@uuid='{{ uuid }}']/{{ item.key }}"
value: "{{ item.value | join(',') }}"
pretty_print: true
notify: reconfigure wireguard
when:
- item.key in ['tunneladdress', 'peers'] and not item.value is string
with_dict:
Expand Down

0 comments on commit 8fdc2df

Please sign in to comment.