From f339345a0b935a7824d27e5ac3aef65e565fb038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andris=20Strazdi=C5=86=C5=A1?= Date: Thu, 16 Jul 2020 17:42:41 +0300 Subject: [PATCH] Update elasticsearch-security-file.yml (#705) Without become option stat operation for old users file will work only if user is in elasticsearch group, but copying of old file will fail because user have no write access in elasticsearch config dir. --- tasks/xpack/security/elasticsearch-security-file.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/xpack/security/elasticsearch-security-file.yml b/tasks/xpack/security/elasticsearch-security-file.yml index ca9e752..b169b9e 100644 --- a/tasks/xpack/security/elasticsearch-security-file.yml +++ b/tasks/xpack/security/elasticsearch-security-file.yml @@ -6,12 +6,14 @@ # Users migration from elasticsearch < 6.3 versions - name: Check if old users file exists + become: yes stat: path: '{{ es_conf_dir }}/x-pack/users' register: old_users_file check_mode: no - name: Copy the old users file from the old deprecated location + become: yes copy: remote_src: yes force: no # only copy it if the new path doesn't exist yet