ansible/roles/re2o-service/tasks/service_user.yml

20 lines
473 B
YAML
Raw Permalink Normal View History

2019-05-03 22:42:55 +02:00
---
# Having a custom group is useless so use nogroup
- name: "Create {{ service_user }} user"
user:
name: "{{ service_user }}"
group: nogroup
home: "{{ service_homedir }}"
system: true
shell: /bin/false
state: present
# Only service user should be able to go there
- name: "Secure {{ service_user }} home directory"
file:
path: "{{ service_homedir }}"
state: directory
owner: "{{ service_user }}"
group: nogroup
2019-05-04 18:43:20 +02:00
mode: 0755