minifirewall: fallback when no trusted ip is provided

This commit is contained in:
Jérémy Lecour 2017-09-14 14:26:44 +02:00 committed by Jérémy Lecour
parent 3a9b95cedc
commit 685282bf93
2 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,7 @@ minifirewall_checkout_path: "/tmp/minifirewall"
minifirewall_int: "{{ ansible_default_ipv4.interface }}"
minifirewall_ipv6: "on"
minifirewall_intlan: "{{ ansible_default_ipv4.address }}/32"
minifirewall_trusted_ips: []
minifirewall_trusted_ips: ["0.0.0.0/0"]
minifirewall_privilegied_ips: []
minifirewall_protected_ports_tcp: [22]

View File

@ -28,6 +28,9 @@
- fail:
msg: You must provide at least 1 trusted IP
when: minifirewall_trusted_ips == []
- debug:
msg: "Warning: minifirewall_trusted_ips='0.0.0.0/0', the firewall is useless!"
when: minifirewall_trusted_ips == ["0.0.0.0/0"]
- name: Configure IP addresses
blockinfile: