From c4e00fdc5f3e55aa7ead9880f3f5aa7aaa275ae9 Mon Sep 17 00:00:00 2001 From: Duy Nguyen Date: Fri, 6 Mar 2020 15:15:28 +0800 Subject: [PATCH] Update elasticsearch-security.yml Refactor template task for copying roles files --- tasks/xpack/security/elasticsearch-security.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tasks/xpack/security/elasticsearch-security.yml b/tasks/xpack/security/elasticsearch-security.yml index f735358..50af433 100644 --- a/tasks/xpack/security/elasticsearch-security.yml +++ b/tasks/xpack/security/elasticsearch-security.yml @@ -44,7 +44,13 @@ #-----------------------------ROLE MAPPING ---------------------------------------- #Copy Roles files -- name: Copy role_mapping.yml File for Instance +- name: Copy role_mapping.yml file for instance 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