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