File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 9
9
- generate-certs
10
10
# Single node
11
11
- hosts : wazuh-manager
12
+ become : yes
12
13
become_user : root
13
14
roles :
14
15
- role : " {{ playbook_dir }}/roles/wazuh-ansible/wazuh-ansible/roles/wazuh/wazuh-indexer"
22
23
path : " {{ local_custom_sca_policies_path }}"
23
24
register : custom_sca_policies_folder
24
25
delegate_to : localhost
26
+ become : no
25
27
26
28
- name : Gather list of custom SCA policies
27
29
find :
30
32
delegate_to : localhost
31
33
register : custom_sca_policies
32
34
when : custom_sca_policies_folder.stat.exists
35
+ become : no
33
36
34
37
- name : Copy custom SCA policy files to Wazuh manager
35
- become : yes
36
38
copy :
37
39
# Note the trailing slash to copy directory contents
38
40
src : " {{ local_custom_sca_policies_path }}/"
42
44
when : custom_sca_policies.files | length > 0
43
45
44
46
- name : Add custom policy definition(s) to the shared Agent config
45
- becomd : yes
46
47
blockinfile :
47
48
path : " /var/ossec/etc/shared/default/agent.conf"
48
49
state : present
65
66
- Restart wazuh
66
67
67
68
- name : Set http/s_proxy vars in ossec-init.conf for vulnerability detector
68
- become : yes
69
69
blockinfile :
70
70
path : " /var/ossec/etc/ossec.conf"
71
71
state : present
84
84
path : " {{ local_custom_certs_path }}"
85
85
register : custom_certificates_folder
86
86
delegate_to : localhost
87
+ become : no
87
88
88
89
- name : Copy the node & admin certificates to Wazuh dashboard
89
- become : yes
90
90
copy :
91
91
src : " {{ local_custom_certs_path }}/{{ item }}"
92
92
dest : /etc/wazuh-dashboard/certs/
101
101
- Restart wazuh-dashboard
102
102
103
103
- name : Perform health check against filebeat
104
- become : yes
105
104
command : filebeat test output
106
105
changed_when : false
107
106
retries : 2
115
114
- name : Restart wazuh-dashboard
116
115
service :
117
116
name : wazuh-dashboard
118
- state : restarted
117
+ state : restarted
You can’t perform that action at this time.
0 commit comments