add ufw rule to allow traffic to server
This commit is contained in:
parent
3352d9fa57
commit
768c54b227
1 changed files with 11 additions and 0 deletions
|
@ -78,3 +78,14 @@
|
||||||
enabled: true
|
enabled: true
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
masked: false
|
masked: false
|
||||||
|
|
||||||
|
- name: Get host public IP
|
||||||
|
uri:
|
||||||
|
url: https://api.ipify.org?format=json
|
||||||
|
register: pub_ip
|
||||||
|
|
||||||
|
- name: Allow traffic to server
|
||||||
|
ufw:
|
||||||
|
rule: allow
|
||||||
|
from: "{{ pub_ip.json.ip }}"
|
||||||
|
delegate_to: "{{ groups['wireguard_server'][0] }}"
|
||||||
|
|
Loading…
Reference in a new issue