Merge pull request #378 from gingerwizard/master

Fix for issue 368
This commit is contained in:
Dale McDiarmid 2017-09-19 12:23:06 +01:00 committed by GitHub
commit 49d90f29ea
3 changed files with 21 additions and 8 deletions

View file

@ -81,12 +81,13 @@
- set_fact: current_roles={{ role_list_response.json | filter_reserved }}
when: manage_native_roles
- debug: msg="{{current_roles}}"
when: manage_native_roles
- set_fact: roles_to_remove={{ current_roles | difference ( es_roles.native.keys() ) }}
when: manage_native_roles
#Delete all non required roles
- name: Delete Native Roles
uri:

View file

@ -9,12 +9,12 @@
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)
- (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)
#-----------------------------FILE BASED REALM----------------------------------------
- include: elasticsearch-security-file.yml
when: (es_enable_xpack and '"security" in es_xpack_features') and ((es_users is defined and es_users.file) 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 ----------------------------------------

View file

@ -4,9 +4,21 @@
#Idempot test is enabled for this test
- name: Simple Example
hosts: localhost
remote_user: root
become: yes
become_method: sudo
roles:
- { role: elasticsearch, es_instance_name: "node1" }
vars:
- { role: elasticsearch, es_config: { "xpack.security.authc.realms.file1.type": "file", "xpack.security.authc.realms.file1.order": 1, "xpack.security.authc.realms.native1.type": "native", "xpack.security.authc.realms.native1.order": 0 }, es_instance_name: "security_node" }
vars:
es_heap_size: "1g"
es_enable_xpack: true
es_plugins:
- plugin: ingest-geoip
es_xpack_features:
- security
- alerting
es_api_basic_auth_username: elastic
es_api_basic_auth_password: changeme
es_users:
native:
testUser:
password: changeme
roles:
- kibana_user