Fix some boolean conditionals. #78

Merged
adellam merged 1 commits from adellam/ansible-roles:master into master 2019-11-02 17:26:18 +01:00
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 - name: Ensure that the firewalld service is stopped and disabled if we do not want it
service: name=firewalld state=stopped enabled=no service: name=firewalld state=stopped enabled=no
when: not firewalld_enabled when: not firewalld_enabled | bool
tags: [ 'iptables', 'firewall', 'firewalld' ] 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 - 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 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. - name: Set the firewalld default zone.
command: firewall-cmd --set-default-zone={{ firewalld_default_zone }} command: firewall-cmd --set-default-zone={{ firewalld_default_zone }}

View File

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