xppl/ansible/roles/perms/tasks/main.yml

49 lines
840 B
YAML

---
- name: Ensure the XPPL group exists.
become: true
group:
name: xppl
system: true
state: present
- name: Ensure the XPPL user exists.
become: true
user:
name: xppl
system: true
groups: xppl
create_home: false
- name: Add the XPPL user to the XPPL group.
become: true
user:
name: xppl
groups: xppl
append: true
- name: Add the Syncthing user to the XPPL group.
become: true
user:
name: syncthing
groups: xppl
append: true
- name: Ensure the XPPL root directory is created.
become: true
file:
path: /var/xppl/
state: directory
owner: xppl
group: xppl
mode: 0755
- name: Ensure the XPPL uploads directory is created.
become: true
file:
path: /var/xppl/xppl/uploads
state: directory
owner: xppl
group: xppl
mode: 0775