Skip to content

Commit

Permalink
Revert become changes in this PR
Browse files Browse the repository at this point in the history
  • Loading branch information
MoteHue committed Nov 7, 2023
1 parent 5e2e452 commit a801224
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions etc/kayobe/ansible/wazuh-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand All @@ -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 }}/"
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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/
Expand All @@ -101,7 +101,6 @@
- Restart wazuh-dashboard

- name: Perform health check against filebeat
become: yes
command: filebeat test output
changed_when: false
retries: 2
Expand All @@ -115,4 +114,4 @@
- name: Restart wazuh-dashboard
service:
name: wazuh-dashboard
state: restarted
state: restarted

0 comments on commit a801224

Please sign in to comment.