forked from ISTI-ansible-roles/ansible-roles
Fix some boolean conditionals.
This commit is contained in:
parent
23921aa74a
commit
d1b27304f3
|
@ -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' ]
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue