|
8 | 8 | file: path={{ conf_dir }}/x-pack state=directory owner={{ es_user }} group={{ es_group }}
|
9 | 9 | changed_when: False
|
10 | 10 | when:
|
11 |
| - - es_enable_xpack and '"security" in es_xpack_features' |
| 11 | + - es_enable_xpack and "security" in es_xpack_features |
12 | 12 | - (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)
|
13 | 13 |
|
14 | 14 | #-----------------------------Create Bootstrap User-----------------------------------
|
|
20 | 20 | environment:
|
21 | 21 | ES_PATH_CONF: "{{ conf_dir }}"
|
22 | 22 | 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', '>')) |
24 | 24 |
|
25 | 25 | - name: Create Bootstrap password for elastic user
|
26 | 26 | shell: echo "{{es_api_basic_auth_password}}" | {{es_home}}/bin/elasticsearch-keystore add -x 'bootstrap.password'
|
27 | 27 | 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 |
29 | 29 | environment:
|
30 | 30 | ES_PATH_CONF: "{{ conf_dir }}"
|
31 | 31 | no_log: true
|
32 | 32 |
|
33 | 33 | #-----------------------------FILE BASED REALM----------------------------------------
|
34 | 34 |
|
35 | 35 | - 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)) |
37 | 37 |
|
38 | 38 | #-----------------------------ROLE MAPPING ----------------------------------------
|
39 | 39 |
|
|
57 | 57 | become: yes
|
58 | 58 | file: path={{ conf_dir }}/security state=directory owner={{ es_user }} group={{ es_group }}
|
59 | 59 | 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 |
0 commit comments