fix boolean checks to use 'bool' filter

This commit is contained in:
AnsibleGuy 2023-05-13 16:04:30 +02:00
parent 893d2a2ceb
commit 991a61ad1f
No known key found for this signature in database
GPG Key ID: 52984C069F5AD3CD
3 changed files with 6 additions and 12 deletions

View File

@ -93,3 +93,5 @@ defaults_apache:
restricted_methods: ['GET', 'POST', 'HEAD']
APACHE_CONFIG: "{{ defaults_apache | combine(apache, recursive=true) }}"
debug: false

View File

@ -5,16 +5,12 @@
- name: "Apache | Debian | Site '{{ name }}' | Showing debug info - user provided config"
ansible.builtin.debug:
var: site_item.value
when:
- debug is defined
- debug
when: debug | bool
- name: "Apache | Debian | Site '{{ name }}' | Showing debug info - running config"
ansible.builtin.debug:
var: site
when:
- debug is defined
- debug
when: debug | bool
- name: "Apache | Debian | Site '{{ name }}' | Checking config"
ansible.builtin.fail:

View File

@ -3,16 +3,12 @@
- name: Apache | Debian | Showing debug info - user provided config
ansible.builtin.debug:
var: apache
when:
- debug is defined
- debug
when: debug | bool
- name: Apache | Debian | Showing debug info - running config
ansible.builtin.debug:
var: APACHE_CONFIG
when:
- debug is defined
- debug
when: debug | bool
- name: Apache | Debian | Install apache
ansible.builtin.apt: