Update elasticsearch-security.yml

Refactor template task for copying roles files
This commit is contained in:
Duy Nguyen 2020-03-06 15:15:28 +08:00 committed by GitHub
parent abb0d4cf68
commit c4e00fdc5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,13 @@
#-----------------------------ROLE MAPPING ---------------------------------------- #-----------------------------ROLE MAPPING ----------------------------------------
#Copy Roles files #Copy Roles files
- name: Copy role_mapping.yml File for Instance - name: Copy role_mapping.yml file for instance
become: yes become: yes
template: src=security/role_mapping.yml.j2 dest={{ es_conf_dir }}/role_mapping.yml owner=root group={{ es_group }} mode=0660 force=yes template:
src: security/role_mapping.yml.j2
dest: "{{ es_conf_dir }}/role_mapping.yml"
owner: root
group: "{{ es_group }}"
mode: "0660"
force: yes
when: es_role_mapping is defined when: es_role_mapping is defined