use become: yes when root is needed

This commit is contained in:
Brad Pitcher 2017-05-12 13:31:50 -07:00
parent 3621561473
commit 024e6caa4b
No known key found for this signature in database
GPG key ID: 9985F03D4EE0AA12
16 changed files with 69 additions and 5 deletions

View file

@ -1,14 +1,17 @@
---
- file: path=/etc/elasticsearch/templates state=directory owner={{ es_user }} group={{ es_group }}
- become: yes
file: path=/etc/elasticsearch/templates state=directory owner={{ es_user }} group={{ es_group }}
- name: Copy default templates to elasticsearch
become: yes
copy: src=templates dest=/etc/elasticsearch/ owner={{ es_user }} group={{ es_group }}
notify: load-templates
when: es_templates_fileglob is not defined
- name: Copy templates to elasticsearch
become: yes
copy: src={{ item }} dest=/etc/elasticsearch/templates owner={{ es_user }} group={{ es_group }}
notify: load-templates
with_fileglob:
- "{{ es_templates_fileglob | default('') }}"
- "{{ es_templates_fileglob | default('') }}"