ansible-role-elasticsearch/tasks/elasticsearch-optional-user.yml
2017-09-19 14:22:02 -06:00

24 lines
646 B
YAML

---
#Add the elasticsearch user before installing from packages.
- name: Ensure optional elasticsearch group is created with the correct id.
become: yes
#Restart if these change
notify: restart elasticsearch
group:
state: present
name: "{{ es_group }}"
system: yes
gid: "{{ es_group_id }}"
- name: Ensure optional elasticsearch user is created with the correct id.
become: yes
#Restart if these change
notify: restart elasticsearch
user:
state: present
name: "{{ es_user }}"
comment: elasticsearch system user
system: yes
createhome: no
uid: "{{ es_user_id }}"
group: "{{ es_group }}"