Fix issue when there's no ports to close off
This commit is contained in:
parent
947b731116
commit
a651894209
1 changed files with 2 additions and 1 deletions
|
@ -38,6 +38,7 @@
|
||||||
systemd:
|
systemd:
|
||||||
name: firewalld
|
name: firewalld
|
||||||
enabled: true
|
enabled: true
|
||||||
|
state: started
|
||||||
|
|
||||||
- name: Define firewall ports
|
- name: Define firewall ports
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -64,5 +65,5 @@
|
||||||
permanent: true
|
permanent: true
|
||||||
immediate: true
|
immediate: true
|
||||||
state: disabled
|
state: disabled
|
||||||
when: item not in requested_firewall_ports
|
when: item and item not in requested_firewall_ports
|
||||||
loop: "{{ firewall_ports.stdout.split(' ') }}"
|
loop: "{{ firewall_ports.stdout.split(' ') }}"
|
||||||
|
|
Loading…
Reference in a new issue