From a801224171137066b00903599db2450069d724af Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Tue, 7 Nov 2023 11:37:06 +0000 Subject: [PATCH] Revert become changes in this PR --- etc/kayobe/ansible/wazuh-manager.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/etc/kayobe/ansible/wazuh-manager.yml b/etc/kayobe/ansible/wazuh-manager.yml index 2d45413cb..fedd1ad93 100644 --- a/etc/kayobe/ansible/wazuh-manager.yml +++ b/etc/kayobe/ansible/wazuh-manager.yml @@ -9,6 +9,7 @@ - generate-certs # Single node - hosts: wazuh-manager + become: yes become_user: root roles: - role: "{{ playbook_dir }}/roles/wazuh-ansible/wazuh-ansible/roles/wazuh/wazuh-indexer" @@ -22,6 +23,7 @@ path: "{{ local_custom_sca_policies_path }}" register: custom_sca_policies_folder delegate_to: localhost + become: no - name: Gather list of custom SCA policies find: @@ -30,9 +32,9 @@ delegate_to: localhost register: custom_sca_policies when: custom_sca_policies_folder.stat.exists + become: no - name: Copy custom SCA policy files to Wazuh manager - become: yes copy: # Note the trailing slash to copy directory contents src: "{{ local_custom_sca_policies_path }}/" @@ -42,7 +44,6 @@ when: custom_sca_policies.files | length > 0 - name: Add custom policy definition(s) to the shared Agent config - becomd: yes blockinfile: path: "/var/ossec/etc/shared/default/agent.conf" state: present @@ -65,7 +66,6 @@ - Restart wazuh - name: Set http/s_proxy vars in ossec-init.conf for vulnerability detector - become: yes blockinfile: path: "/var/ossec/etc/ossec.conf" state: present @@ -84,9 +84,9 @@ path: "{{ local_custom_certs_path }}" register: custom_certificates_folder delegate_to: localhost + become: no - name: Copy the node & admin certificates to Wazuh dashboard - become: yes copy: src: "{{ local_custom_certs_path }}/{{ item }}" dest: /etc/wazuh-dashboard/certs/ @@ -101,7 +101,6 @@ - Restart wazuh-dashboard - name: Perform health check against filebeat - become: yes command: filebeat test output changed_when: false retries: 2 @@ -115,4 +114,4 @@ - name: Restart wazuh-dashboard service: name: wazuh-dashboard - state: restarted \ No newline at end of file + state: restarted