Merge pull request #429 from pemontto/master
Fix conditionals introduced in #412 and others
This commit is contained in:
commit
143cf8bf4a
3 changed files with 8 additions and 8 deletions
|
|
@ -50,7 +50,7 @@
|
||||||
- set_fact: manage_native_realm=false
|
- set_fact: manage_native_realm=false
|
||||||
|
|
||||||
- set_fact: manage_native_realm=true
|
- set_fact: manage_native_realm=true
|
||||||
when: es_start_service and (es_enable_xpack and '"security" in es_xpack_features') and ((es_users is defined and es_users.native is defined) or (es_roles is defined and es_roles.native is defined))
|
when: es_start_service and (es_enable_xpack and "security" in es_xpack_features) and ((es_users is defined and es_users.native is defined) or (es_roles is defined and es_roles.native is defined))
|
||||||
|
|
||||||
# If playbook runs too fast, Native commands could fail as the Native Realm is not yet up
|
# If playbook runs too fast, Native commands could fail as the Native Realm is not yet up
|
||||||
- name: Wait 15 seconds for the Native Relm to come up
|
- name: Wait 15 seconds for the Native Relm to come up
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
file: path={{ conf_dir }}/x-pack state=directory owner={{ es_user }} group={{ es_group }}
|
file: path={{ conf_dir }}/x-pack state=directory owner={{ es_user }} group={{ es_group }}
|
||||||
changed_when: False
|
changed_when: False
|
||||||
when:
|
when:
|
||||||
- es_enable_xpack and '"security" in es_xpack_features'
|
- es_enable_xpack and "security" in es_xpack_features
|
||||||
- (es_users is defined and es_users.file is defined) or (es_roles is defined and es_roles.file is defined) or (es_role_mapping is defined)
|
- (es_users is defined and es_users.file is defined) or (es_roles is defined and es_roles.file is defined) or (es_role_mapping is defined)
|
||||||
|
|
||||||
#-----------------------------Create Bootstrap User-----------------------------------
|
#-----------------------------Create Bootstrap User-----------------------------------
|
||||||
|
|
@ -20,12 +20,12 @@
|
||||||
environment:
|
environment:
|
||||||
ES_PATH_CONF: "{{ conf_dir }}"
|
ES_PATH_CONF: "{{ conf_dir }}"
|
||||||
when:
|
when:
|
||||||
- (es_enable_xpack and '"security" in es_xpack_features') and (es_version | version_compare('6.0.0', '>'))
|
- (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_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
|
- (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
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
#-----------------------------FILE BASED REALM----------------------------------------
|
#-----------------------------FILE BASED REALM----------------------------------------
|
||||||
|
|
||||||
- include: elasticsearch-security-file.yml
|
- include: elasticsearch-security-file.yml
|
||||||
when: (es_enable_xpack and '"security" in es_xpack_features') and ((es_users is defined and es_users.file is defined) or (es_roles is defined and es_roles.file is defined))
|
when: (es_enable_xpack and "security" in es_xpack_features) and ((es_users is defined and es_users.file is defined) or (es_roles is defined and es_roles.file is defined))
|
||||||
|
|
||||||
#-----------------------------ROLE MAPPING ----------------------------------------
|
#-----------------------------ROLE MAPPING ----------------------------------------
|
||||||
|
|
||||||
|
|
@ -57,4 +57,4 @@
|
||||||
become: yes
|
become: yes
|
||||||
file: path={{ conf_dir }}/security state=directory owner={{ es_user }} group={{ es_group }}
|
file: path={{ conf_dir }}/security state=directory owner={{ es_user }} group={{ es_group }}
|
||||||
changed_when: False
|
changed_when: False
|
||||||
when: es_enable_xpack and '"security" in es_xpack_features'
|
when: es_enable_xpack and "security" in es_xpack_features
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
return_content: yes
|
return_content: yes
|
||||||
register: license_activated
|
register: license_activated
|
||||||
no_log: True
|
no_log: True
|
||||||
when: 'not "security" in es_xpack_features'
|
when: not "security" in es_xpack_features
|
||||||
failed_when: >
|
failed_when: >
|
||||||
license_activated.status != 200 or
|
license_activated.status != 200 or
|
||||||
license_activated.json.license_status is not defined or
|
license_activated.json.license_status is not defined or
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
return_content: yes
|
return_content: yes
|
||||||
register: license_activated
|
register: license_activated
|
||||||
no_log: True
|
no_log: True
|
||||||
when: '"security" in es_xpack_features'
|
when: "'security' in es_xpack_features"
|
||||||
failed_when: >
|
failed_when: >
|
||||||
license_activated.status != 200 or
|
license_activated.status != 200 or
|
||||||
license_activated.json.license_status is not defined or
|
license_activated.json.license_status is not defined or
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue