Custom user configuration updated

This commit is contained in:
Gonzalo Acuña 2022-02-22 14:25:58 -03:00
parent 1f8dcbd384
commit 43e792754a
No known key found for this signature in database
GPG Key ID: 646BA79A313A2270
4 changed files with 17 additions and 4 deletions

View File

@ -119,7 +119,7 @@
hidden: 'no'
wazuh_api_users:
- username: custom-user
password: SecretPassword!
password: SecretPassword1!
filebeat_output_indexer_hosts:
- "{{ hostvars.wi1.private_ip }}"
- "{{ hostvars.wi2.private_ip }}"

View File

@ -97,6 +97,6 @@ if __name__ == "__main__":
password=password,
)
# disable unused default users
for def_user in ['wazuh', 'wazuh-wui']:
if def_user != username:
disable_user(initial_users[def_user])
#for def_user in ['wazuh', 'wazuh-wui']:
# if def_user != username:
# disable_user(initial_users[def_user])

View File

@ -260,6 +260,15 @@
group: wazuh
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
script:
chdir: "{{ wazuh_dir }}/framework/scripts/"

View File

@ -0,0 +1,4 @@
{% for api in wazuh_api_users %}
{"username":"{{ api['username'] }}", "password": "{{ api['password'] }}"}
{% endfor %}