Fix some boolean conditionals.

This commit is contained in:
Andrea Dell'Amico 2019-11-02 17:25:46 +01:00
parent 23921aa74a
commit d1b27304f3
3 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
---
- name: Ensure that the firewalld service is stopped and disabled if we do not want it
service: name=firewalld state=stopped enabled=no
when: not firewalld_enabled
when: not firewalld_enabled | bool
tags: [ 'iptables', 'firewall', 'firewalld' ]

View File

@ -6,7 +6,7 @@
- name: Open the ssh service to the world. We rely on fail2ban to stop unauthorized accesses
firewalld: service=ssh zone={{ firewalld_default_zone }} permanent=True state=enabled immediate=True
when: firewalld_ssh_enabled_on_default_zone
when: firewalld_ssh_enabled_on_default_zone | bool
- name: Set the firewalld default zone.
command: firewall-cmd --set-default-zone={{ firewalld_default_zone }}

View File

@ -1,7 +1,7 @@
---
- import_tasks: firewalld_rules.yml
when: firewalld_enabled
when: firewalld_enabled | bool
- import_tasks: disable_firewalld.yml
when: not firewalld_enabled
when: not firewalld_enabled | bool