Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit 27d81e6

Browse files
committed
Fix conditionals introduced in #408
1 parent d7a5af8 commit 27d81e6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
- set_fact: manage_native_realm=false
5151

5252
- set_fact: manage_native_realm=true
53-
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))
53+
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))
5454

5555
# If playbook runs too fast, Native commands could fail as the Native Realm is not yet up
5656
- name: Wait 15 seconds for the Native Relm to come up

tasks/xpack/security/elasticsearch-security.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
file: path={{ conf_dir }}/x-pack state=directory owner={{ es_user }} group={{ es_group }}
99
changed_when: False
1010
when:
11-
- es_enable_xpack and '"security" in es_xpack_features'
11+
- es_enable_xpack and "security" in es_xpack_features
1212
- (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)
1313

1414
#-----------------------------Create Bootstrap User-----------------------------------
@@ -20,20 +20,20 @@
2020
environment:
2121
ES_PATH_CONF: "{{ conf_dir }}"
2222
when:
23-
- (es_enable_xpack and '"security" in es_xpack_features') and (es_version | version_compare('6.0.0', '>'))
23+
- (es_enable_xpack and "security" in es_xpack_features) and (es_version | version_compare('6.0.0', '>'))
2424

2525
- name: Create Bootstrap password for elastic user
2626
shell: echo "{{es_api_basic_auth_password}}" | {{es_home}}/bin/elasticsearch-keystore add -x 'bootstrap.password'
2727
when:
28-
- (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
28+
- (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
2929
environment:
3030
ES_PATH_CONF: "{{ conf_dir }}"
3131
no_log: true
3232

3333
#-----------------------------FILE BASED REALM----------------------------------------
3434

3535
- include: elasticsearch-security-file.yml
36-
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))
36+
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))
3737

3838
#-----------------------------ROLE MAPPING ----------------------------------------
3939

@@ -57,4 +57,4 @@
5757
become: yes
5858
file: path={{ conf_dir }}/security state=directory owner={{ es_user }} group={{ es_group }}
5959
changed_when: False
60-
when: es_enable_xpack and '"security" in es_xpack_features'
60+
when: es_enable_xpack and "security" in es_xpack_features

tasks/xpack/security/elasticsearch-xpack-activation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
return_content: yes
1010
register: license_activated
1111
no_log: True
12-
when: 'not "security" in es_xpack_features'
12+
when: not "security" in es_xpack_features
1313
failed_when: >
1414
license_activated.status != 200 or
1515
license_activated.json.license_status is not defined or
@@ -27,7 +27,7 @@
2727
return_content: yes
2828
register: license_activated
2929
no_log: True
30-
when: '"security" in es_xpack_features'
30+
when: "'security' in es_xpack_features"
3131
failed_when: >
3232
license_activated.status != 200 or
3333
license_activated.json.license_status is not defined or

0 commit comments

Comments
 (0)