Fix issue when there's no ports to close off

This commit is contained in:
Jake Howard 2020-06-04 09:23:50 +01:00
parent 947b731116
commit a651894209
Signed by: jake
GPG Key ID: 57AFB45680EDD477

View File

@ -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(' ') }}"