Ensure boolean condition evaluations

This commit is contained in:
Jesus Garcia 2026-01-23 13:25:16 -05:00
parent 4b002a62ab
commit efb6d1a4f4
No known key found for this signature in database
GPG Key ID: 8461CA78326C96C9
2 changed files with 9 additions and 7 deletions

View File

@ -10,7 +10,7 @@
- tar
state: present
register: package_status
until: "package_status is not failed"
until: "package_status is not failed"
retries: 10
delay: 10
@ -20,7 +20,7 @@
state: present
when: ansible_distribution != "Amazon" and ansible_distribution_version != "2023"
register: package_status
until: "package_status is not failed"
until: "package_status is not failed"
retries: 10
delay: 10
@ -30,7 +30,7 @@
state: present
when: ansible_distribution == "Amazon" and ansible_distribution_version == "2023"
register: package_status
until: "package_status is not failed"
until: "package_status is not failed"
retries: 10
delay: 10
@ -73,7 +73,7 @@
tags:
- init
- config
- name: Install expect
package:
name: expect
@ -242,7 +242,7 @@
notify: restart wazuh-manager
when:
- csyslog_enabled.stdout == '0' or "skipped" in csyslog_enabled.stdout
- syslog_output is defined and syslog_output
- syslog_output is defined and (syslog_output | bool)
tags:
- config

View File

@ -108,7 +108,8 @@
delay: 5
tags: debug
when:
- hostvars[inventory_hostname]['private_ip'] is not defined or (hostvars[inventory_hostname]['private_ip'] | string | length) == 0
- hostvars[inventory_hostname]['private_ip'] is not defined or
(hostvars[inventory_hostname]['private_ip'] | length) == 0
- name: Wait for Wazuh indexer API (Private IP)
uri:
@ -127,7 +128,8 @@
delay: 5
tags: debug
when:
- hostvars[inventory_hostname]['private_ip'] is defined and (hostvars[inventory_hostname]['private_ip'] | string | length) > 0
- hostvars[inventory_hostname]['private_ip'] is defined and
(hostvars[inventory_hostname]['private_ip'] | length) > 0
- import_tasks: "RMRedHat.yml"
when: ansible_os_family == "RedHat"