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.
This commit is contained in:
parent
d99c0c86c5
commit
f339345a0b
1 changed files with 2 additions and 0 deletions
|
|
@ -6,12 +6,14 @@
|
||||||
|
|
||||||
# Users migration from elasticsearch < 6.3 versions
|
# Users migration from elasticsearch < 6.3 versions
|
||||||
- name: Check if old users file exists
|
- name: Check if old users file exists
|
||||||
|
become: yes
|
||||||
stat:
|
stat:
|
||||||
path: '{{ es_conf_dir }}/x-pack/users'
|
path: '{{ es_conf_dir }}/x-pack/users'
|
||||||
register: old_users_file
|
register: old_users_file
|
||||||
check_mode: no
|
check_mode: no
|
||||||
|
|
||||||
- name: Copy the old users file from the old deprecated location
|
- name: Copy the old users file from the old deprecated location
|
||||||
|
become: yes
|
||||||
copy:
|
copy:
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
force: no # only copy it if the new path doesn't exist yet
|
force: no # only copy it if the new path doesn't exist yet
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue