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

@ -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"