From e698280eb887524d72535ab7df35af27efc7f3fe Mon Sep 17 00:00:00 2001 From: Jesus Garcia Date: Tue, 20 Jan 2026 09:54:27 -0500 Subject: [PATCH 1/3] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41298808..90246d6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ All notable changes to this project will be documented in this file. ### Changed -- None +- Ensure boolean condition evaluations - from community PR #1897 ([#1911](https://github.com/wazuh/wazuh-ansible/pull/1911)) ### Fixed From 4b002a62abb397b0b27229aa498a5b52e13b5c32 Mon Sep 17 00:00:00 2001 From: Jesus Garcia Date: Wed, 21 Jan 2026 00:21:21 -0500 Subject: [PATCH 2/3] Remove unused parameter indexer_create_custom_user --- roles/wazuh/wazuh-indexer/tasks/security_actions.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/wazuh/wazuh-indexer/tasks/security_actions.yml b/roles/wazuh/wazuh-indexer/tasks/security_actions.yml index 28c88c38..f29a9b16 100644 --- a/roles/wazuh/wazuh-indexer/tasks/security_actions.yml +++ b/roles/wazuh/wazuh-indexer/tasks/security_actions.yml @@ -114,6 +114,5 @@ register: result until: result.status in [200,201,401] when: - - indexer_create_custom_user | default(false) | bool - indexer_custom_user | default('') | trim | length > 0 - inventory_hostname == ansible_play_hosts[0] From efb6d1a4f469c5a98cff9547194e123077b2c43b Mon Sep 17 00:00:00 2001 From: Jesus Garcia Date: Fri, 23 Jan 2026 13:25:16 -0500 Subject: [PATCH 3/3] Ensure boolean condition evaluations --- roles/wazuh/ansible-wazuh-manager/tasks/main.yml | 10 +++++----- roles/wazuh/wazuh-indexer/tasks/main.yml | 6 ++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/roles/wazuh/ansible-wazuh-manager/tasks/main.yml b/roles/wazuh/ansible-wazuh-manager/tasks/main.yml index 1614ed84..6bbd5b33 100644 --- a/roles/wazuh/ansible-wazuh-manager/tasks/main.yml +++ b/roles/wazuh/ansible-wazuh-manager/tasks/main.yml @@ -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 diff --git a/roles/wazuh/wazuh-indexer/tasks/main.yml b/roles/wazuh/wazuh-indexer/tasks/main.yml index 291f606b..24a2291f 100644 --- a/roles/wazuh/wazuh-indexer/tasks/main.yml +++ b/roles/wazuh/wazuh-indexer/tasks/main.yml @@ -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"