Moved up the x-pack directory logic to include role_mappings
Signed-off-by: Russell Snyder <russell@redowl.com>
This commit is contained in:
parent
32c7a13b69
commit
eed6352dfb
2 changed files with 9 additions and 7 deletions
|
|
@ -1,12 +1,6 @@
|
||||||
---
|
---
|
||||||
- set_fact: manage_file_users=es_users is defined and es_users.file is defined
|
- set_fact: manage_file_users=es_users is defined and es_users.file is defined
|
||||||
|
|
||||||
#Ensure x-pack conf directory is created
|
|
||||||
- name: Ensure x-pack conf directory exists (file)
|
|
||||||
file: path={{ conf_dir }}/x-pack state=directory owner={{ es_user }} group={{ es_group }}
|
|
||||||
changed_when: False
|
|
||||||
when: es_enable_xpack and '"security" in es_xpack_features'
|
|
||||||
|
|
||||||
#List current users
|
#List current users
|
||||||
- name: List Users
|
- name: List Users
|
||||||
shell: cat {{conf_dir}}/x-pack/users | awk -F':' '{print $1}'
|
shell: cat {{conf_dir}}/x-pack/users | awk -F':' '{print $1}'
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,14 @@
|
||||||
|
|
||||||
#TODO: 1. Skip users with no password defined or error 2. Passwords | length > 6
|
#TODO: 1. Skip users with no password defined or error 2. Passwords | length > 6
|
||||||
|
|
||||||
|
#Ensure x-pack conf directory is created if necessary
|
||||||
|
- name: Ensure x-pack conf directory exists (file)
|
||||||
|
file: path={{ conf_dir }}/x-pack state=directory owner={{ es_user }} group={{ es_group }}
|
||||||
|
changed_when: False
|
||||||
|
when:
|
||||||
|
- es_enable_xpack and '"security" in es_xpack_features'
|
||||||
|
- (es_users is defined and es_users.file) or (es_roles is defined and es_roles.file is defined) or (es_role_mapping is defined)
|
||||||
|
|
||||||
#-----------------------------FILE BASED REALM----------------------------------------
|
#-----------------------------FILE BASED REALM----------------------------------------
|
||||||
|
|
||||||
- include: elasticsearch-security-file.yml
|
- include: elasticsearch-security-file.yml
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue