Bootstrap changes only for ES 6.x and with xpack
This commit is contained in:
parent
e77cdc586d
commit
89601d731d
2 changed files with 4 additions and 2 deletions
|
|
@ -16,3 +16,4 @@
|
||||||
- name: Set elasticsearch.keystore Permissions
|
- name: Set elasticsearch.keystore Permissions
|
||||||
become: yes
|
become: yes
|
||||||
file: state=file path={{ conf_dir }}/elasticsearch.keystore owner={{ es_user }} group={{ es_group }}
|
file: state=file path={{ conf_dir }}/elasticsearch.keystore owner={{ es_user }} group={{ es_group }}
|
||||||
|
when: es_enable_xpack and "security" in es_xpack_features and (es_version | version_compare('6.0.0', '>'))
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,13 @@
|
||||||
register: list_keystore
|
register: list_keystore
|
||||||
environment:
|
environment:
|
||||||
ES_PATH_CONF: "{{ conf_dir }}"
|
ES_PATH_CONF: "{{ conf_dir }}"
|
||||||
|
when:
|
||||||
|
- (es_enable_xpack and '"security" in es_xpack_features') and (es_version | version_compare('6.0.0', '>'))
|
||||||
|
|
||||||
- name: Create Bootstrap password for elastic user
|
- name: Create Bootstrap password for elastic user
|
||||||
shell: echo "{{es_api_basic_auth_password}}" | {{es_home}}/bin/elasticsearch-keystore add -x 'bootstrap.password'
|
shell: echo "{{es_api_basic_auth_password}}" | {{es_home}}/bin/elasticsearch-keystore add -x 'bootstrap.password'
|
||||||
when:
|
when:
|
||||||
- es_api_basic_auth_username == 'elastic' and 'bootstrap.password' not in list_keystore.stdout_lines
|
- (es_enable_xpack and '"security" in es_xpack_features') and (es_version | version_compare('6.0.0', '>')) and es_api_basic_auth_username is defined and list_keystore is defined and es_api_basic_auth_username == 'elastic' and 'bootstrap.password' not in list_keystore.stdout_lines
|
||||||
environment:
|
environment:
|
||||||
ES_PATH_CONF: "{{ conf_dir }}"
|
ES_PATH_CONF: "{{ conf_dir }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue