Skip to content

Commit

Permalink
Fix securityadmin.sh when copy_custom_security_configs is False (#85) (
Browse files Browse the repository at this point in the history
…#99)

* Fix securityadmin.sh when copy_custom_security_configs is False

Signed-off-by: Rodolfo Camara Villordo <[email protected]>

* Update descriptions

Signed-off-by: Peter Zhu <[email protected]>

Signed-off-by: Rodolfo Camara Villordo <[email protected]>
Signed-off-by: Peter Zhu <[email protected]>
Co-authored-by: Peter Zhu <[email protected]>

Signed-off-by: Rodolfo Camara Villordo <[email protected]>
Signed-off-by: Peter Zhu <[email protected]>
Co-authored-by: Rodolfo Câmara Villordo <[email protected]>
  • Loading branch information
peterzhuamazon and rodolfovillordo authored Oct 7, 2022
1 parent 1ec957d commit e5463ca
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions roles/linux/opensearch/tasks/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@

when: custom_users_result.stat.exists

- name: Security Plugin configuration | Initialize the opensearch security index in opensearch
- name: Security Plugin configuration | Initialize the opensearch security index in opensearch with custom configs
shell: >
bash {{ os_sec_plugin_tools_path }}/securityadmin.sh
-cacert {{ os_conf_dir }}/root-ca.pem
Expand All @@ -285,7 +285,21 @@
environment:
JAVA_HOME: "{{ os_home }}/jdk"
run_once: true
when: configuration.changed or copy_custom_security_configs
when: configuration.changed and copy_custom_security_configs

- name: Security Plugin configuration | Initialize the opensearch security index in opensearch with default configs
shell: >
bash {{ os_sec_plugin_tools_path }}/securityadmin.sh
-cacert {{ os_conf_dir }}/root-ca.pem
-cert {{ os_conf_dir }}/admin.pem
-key {{ os_conf_dir }}/admin.key
-f {{ os_sec_plugin_conf_path }}/internal_users.yml
-nhnv -icl
-h {{ hostvars[inventory_hostname]['ip'] }}
environment:
JAVA_HOME: "{{ os_home }}/jdk"
run_once: true
when: configuration.changed and not copy_custom_security_configs

- name: Security Plugin configuration | Cleanup local temporary directory
local_action:
Expand Down

0 comments on commit e5463ca

Please sign in to comment.