From 6528e1d4b817cfee96029b246b52b97ee77c9a04 Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Fri, 1 Dec 2023 13:48:06 +0000 Subject: [PATCH] Fix Wazuh agent playbook w/o using custom policies --- etc/kayobe/ansible/wazuh-agent.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/kayobe/ansible/wazuh-agent.yml b/etc/kayobe/ansible/wazuh-agent.yml index cd5afce93..730828604 100644 --- a/etc/kayobe/ansible/wazuh-agent.yml +++ b/etc/kayobe/ansible/wazuh-agent.yml @@ -28,7 +28,9 @@ owner: wazuh group: wazuh block: sca.remote_commands=1 - when: custom_sca_policies.files | length > 0 + when: + - custom_sca_policies_folder.stat.exists + - custom_sca_policies.files | length > 0 notify: - Restart wazuh-agent