ansible/roles/matrix_appservice_irc/tasks/service_user.yml

20 lines
473 B
YAML
Raw Normal View History

2019-03-29 19:25:11 +01:00
---
# Having a custom group is useless so use nogroup
- name: "Create {{ service_user }} user"
2019-03-29 19:25:11 +01:00
user:
name: "{{ service_user }}"
2019-03-29 19:25:11 +01:00
group: nogroup
home: "{{ service_homedir }}"
2019-03-29 19:25:11 +01:00
system: true
shell: /bin/false
state: present
# Only service user should be able to go there
- name: "Secure {{ service_user }} home directory"
2019-03-29 19:25:11 +01:00
file:
path: "{{ service_homedir }}"
2019-03-29 19:25:11 +01:00
state: directory
owner: "{{ service_user }}"
2019-03-29 19:25:11 +01:00
group: nogroup
mode: 0700