Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit f339345

Browse files
authored
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.
1 parent d99c0c8 commit f339345

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tasks/xpack/security/elasticsearch-security-file.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66

77
# Users migration from elasticsearch < 6.3 versions
88
- name: Check if old users file exists
9+
become: yes
910
stat:
1011
path: '{{ es_conf_dir }}/x-pack/users'
1112
register: old_users_file
1213
check_mode: no
1314

1415
- name: Copy the old users file from the old deprecated location
16+
become: yes
1517
copy:
1618
remote_src: yes
1719
force: no # only copy it if the new path doesn't exist yet

0 commit comments

Comments
 (0)