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:
Andris Strazdiņš 2020-07-16 17:42:41 +03:00 committed by GitHub
parent d99c0c86c5
commit f339345a0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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