Custom user configuration updated
This commit is contained in:
parent
1f8dcbd384
commit
43e792754a
@ -119,7 +119,7 @@
|
|||||||
hidden: 'no'
|
hidden: 'no'
|
||||||
wazuh_api_users:
|
wazuh_api_users:
|
||||||
- username: custom-user
|
- username: custom-user
|
||||||
password: SecretPassword!
|
password: SecretPassword1!
|
||||||
filebeat_output_indexer_hosts:
|
filebeat_output_indexer_hosts:
|
||||||
- "{{ hostvars.wi1.private_ip }}"
|
- "{{ hostvars.wi1.private_ip }}"
|
||||||
- "{{ hostvars.wi2.private_ip }}"
|
- "{{ hostvars.wi2.private_ip }}"
|
||||||
|
|||||||
@ -97,6 +97,6 @@ if __name__ == "__main__":
|
|||||||
password=password,
|
password=password,
|
||||||
)
|
)
|
||||||
# disable unused default users
|
# disable unused default users
|
||||||
for def_user in ['wazuh', 'wazuh-wui']:
|
#for def_user in ['wazuh', 'wazuh-wui']:
|
||||||
if def_user != username:
|
# if def_user != username:
|
||||||
disable_user(initial_users[def_user])
|
# disable_user(initial_users[def_user])
|
||||||
@ -260,6 +260,15 @@
|
|||||||
group: wazuh
|
group: wazuh
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Create admin.json
|
||||||
|
template:
|
||||||
|
src: templates/admin.json.j2
|
||||||
|
dest: "{{ wazuh_dir }}/api/configuration/admin.json"
|
||||||
|
owner: wazuh
|
||||||
|
group: wazuh
|
||||||
|
mode: 0644
|
||||||
|
no_log: true
|
||||||
|
|
||||||
- name: Execute create_user script
|
- name: Execute create_user script
|
||||||
script:
|
script:
|
||||||
chdir: "{{ wazuh_dir }}/framework/scripts/"
|
chdir: "{{ wazuh_dir }}/framework/scripts/"
|
||||||
|
|||||||
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
{% for api in wazuh_api_users %}
|
||||||
|
{"username":"{{ api['username'] }}", "password": "{{ api['password'] }}"}
|
||||||
|
{% endfor %}
|
||||||
Loading…
Reference in New Issue
Block a user