Skip to content

Commit 3f92251

Browse files
committed
Fix Wazuh manager playbook with no custom policies
1 parent b59b4d7 commit 3f92251

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

etc/kayobe/ansible/wazuh-manager.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
dest: "/var/ossec/etc/shared/default/"
4242
owner: wazuh
4343
group: wazuh
44-
when: custom_sca_policies.files | length > 0
44+
when:
45+
- custom_sca_policies_folder.stat.exists
46+
- custom_sca_policies.files | length > 0
4547

4648
- name: Add custom policy definition(s) to the shared Agent config
4749
blockinfile:
@@ -61,7 +63,9 @@
6163
</policies>
6264
</sca>
6365
{% endfilter %}
64-
when: custom_sca_policies.files | length > 0
66+
when:
67+
- custom_sca_policies_folder.stat.exists
68+
- custom_sca_policies.files | length > 0
6569
notify:
6670
- Restart wazuh
6771

0 commit comments

Comments
 (0)