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:
|
||||
name: firewalld
|
||||
enabled: true
|
||||
state: started
|
||||
|
||||
- name: Define firewall ports
|
||||
set_fact:
|
||||
|
@ -64,5 +65,5 @@
|
|||
permanent: true
|
||||
immediate: true
|
||||
state: disabled
|
||||
when: item not in requested_firewall_ports
|
||||
when: item and item not in requested_firewall_ports
|
||||
loop: "{{ firewall_ports.stdout.split(' ') }}"
|
||||
|
|
Loading…
Reference in a new issue