Merge pull request #1110 from wazuh/1109-enhacement-rolloveralias
Rollover alias script execution added
This commit is contained in:
commit
971ea76ede
@ -15,4 +15,4 @@ wazuh_macos_arm_package_url: "https://packages.wazuh.com/4.x/macos/{{ wazuh_maco
|
|||||||
certs_gen_tool_version: 4.8
|
certs_gen_tool_version: 4.8
|
||||||
|
|
||||||
# Url of certificates generator tool
|
# Url of certificates generator tool
|
||||||
certs_gen_tool_url: "https://packages.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
|
certs_gen_tool_url: "https://packages.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
|
||||||
|
|||||||
@ -15,4 +15,4 @@ wazuh_macos_arm_package_url: "https://packages-dev.wazuh.com/pre-release/macos/{
|
|||||||
certs_gen_tool_version: 4.8
|
certs_gen_tool_version: 4.8
|
||||||
|
|
||||||
# Url of certificates generator tool
|
# Url of certificates generator tool
|
||||||
certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
|
certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
|
||||||
|
|||||||
@ -14,4 +14,4 @@ wazuh_macos_arm_package_url: "https://packages-dev.wazuh.com/staging/macos/{{ wa
|
|||||||
certs_gen_tool_version: 4.8
|
certs_gen_tool_version: 4.8
|
||||||
|
|
||||||
# Url of certificates generator tool
|
# Url of certificates generator tool
|
||||||
certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
|
certs_gen_tool_url: "https://packages-dev.wazuh.com/{{ certs_gen_tool_version }}/wazuh-certs-tool.sh"
|
||||||
|
|||||||
@ -28,6 +28,7 @@ domain_name: wazuh.com
|
|||||||
|
|
||||||
indexer_sec_plugin_conf_path: /etc/wazuh-indexer/opensearch-security
|
indexer_sec_plugin_conf_path: /etc/wazuh-indexer/opensearch-security
|
||||||
indexer_sec_plugin_tools_path: /usr/share/wazuh-indexer/plugins/opensearch-security/tools
|
indexer_sec_plugin_tools_path: /usr/share/wazuh-indexer/plugins/opensearch-security/tools
|
||||||
|
indexer_bin_path: /usr/share/wazuh-indexer/bin
|
||||||
indexer_conf_path: /etc/wazuh-indexer
|
indexer_conf_path: /etc/wazuh-indexer
|
||||||
indexer_index_path: /var/lib/wazuh-indexer/
|
indexer_index_path: /var/lib/wazuh-indexer/
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
{{ indexer_sec_plugin_tools_path }}/hash.sh -p '{{ indexer_admin_password }}'
|
{{ indexer_sec_plugin_tools_path }}/hash.sh -p '{{ indexer_admin_password }}'
|
||||||
register: indexer_admin_password_hashed
|
register: indexer_admin_password_hashed
|
||||||
no_log: '{{ indexer_nolog_sensible | bool }}'
|
no_log: '{{ indexer_nolog_sensible | bool }}'
|
||||||
|
|
||||||
- name: Set the Admin user password
|
- name: Set the Admin user password
|
||||||
replace:
|
replace:
|
||||||
path: "{{ indexer_sec_plugin_conf_path }}/internal_users.yml"
|
path: "{{ indexer_sec_plugin_conf_path }}/internal_users.yml"
|
||||||
@ -60,7 +60,7 @@
|
|||||||
replace: "{{ indexer_password_hash | quote }}"
|
replace: "{{ indexer_password_hash | quote }}"
|
||||||
vars:
|
vars:
|
||||||
indexer_password_hash: "{{ indexer_admin_password_hashed.stdout_lines | last }}"
|
indexer_password_hash: "{{ indexer_admin_password_hashed.stdout_lines | last }}"
|
||||||
|
|
||||||
# this can also be achieved with password_hash, but it requires dependencies on the controller
|
# this can also be achieved with password_hash, but it requires dependencies on the controller
|
||||||
- name: Hash the kibanaserver role/user pasword
|
- name: Hash the kibanaserver role/user pasword
|
||||||
shell: |
|
shell: |
|
||||||
@ -68,7 +68,7 @@
|
|||||||
{{ indexer_sec_plugin_tools_path }}/hash.sh -p '{{ dashboard_password }}'
|
{{ indexer_sec_plugin_tools_path }}/hash.sh -p '{{ dashboard_password }}'
|
||||||
register: indexer_kibanaserver_password_hashed
|
register: indexer_kibanaserver_password_hashed
|
||||||
no_log: '{{ indexer_nolog_sensible | bool }}'
|
no_log: '{{ indexer_nolog_sensible | bool }}'
|
||||||
|
|
||||||
- name: Set the kibanaserver user password
|
- name: Set the kibanaserver user password
|
||||||
replace:
|
replace:
|
||||||
path: "{{ indexer_sec_plugin_conf_path }}/internal_users.yml"
|
path: "{{ indexer_sec_plugin_conf_path }}/internal_users.yml"
|
||||||
@ -76,7 +76,7 @@
|
|||||||
replace: "{{ indexer_password_hash | quote }}"
|
replace: "{{ indexer_password_hash | quote }}"
|
||||||
vars:
|
vars:
|
||||||
indexer_password_hash: "{{ indexer_kibanaserver_password_hashed.stdout_lines | last }}"
|
indexer_password_hash: "{{ indexer_kibanaserver_password_hashed.stdout_lines | last }}"
|
||||||
|
|
||||||
- name: Initialize the Opensearch security index in Wazuh indexer
|
- name: Initialize the Opensearch security index in Wazuh indexer
|
||||||
command: >
|
command: >
|
||||||
sudo -u wazuh-indexer OPENSEARCH_PATH_CONF={{ indexer_conf_path }}
|
sudo -u wazuh-indexer OPENSEARCH_PATH_CONF={{ indexer_conf_path }}
|
||||||
@ -93,8 +93,16 @@
|
|||||||
delay: 5
|
delay: 5
|
||||||
register: result
|
register: result
|
||||||
until: result.rc == 0
|
until: result.rc == 0
|
||||||
run_once: true
|
|
||||||
|
|
||||||
|
- name: Initialize ISM script
|
||||||
|
command: >
|
||||||
|
{{ indexer_bin_path }}/indexer-ism-init.sh
|
||||||
|
-p {{ indexer_admin_password }}
|
||||||
|
-i {{ target_address }}
|
||||||
|
become: yes
|
||||||
|
become_user: root
|
||||||
|
|
||||||
|
run_once: true
|
||||||
|
|
||||||
- name: Create custom user
|
- name: Create custom user
|
||||||
uri:
|
uri:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user