vps/roles/authelia/tasks/setup.yml

26 lines
745 B
YAML
Raw Normal View History

- name: "(Re)Create {{ project_dir }} project directory"
2024-03-31 18:26:05 +02:00
file:
path: "{{ project_dir }}"
state: "{{ item }}"
loop:
- absent
- directory
2024-03-31 18:26:05 +02:00
- name: Template docker-compose.yaml & configuration.yml to project directory
template:
src: "{{ item }}"
dest: "{{ project_dir }}/{{ item }}"
owner: "{{ host_uid }}"
group: "{{ host_uid }}"
mode: '640'
loop:
- docker-compose.yaml
- configuration.yml
# Separate task because template module cannot chown/chgrp to a non-existing user/group
- name: "Change group of homeserver.yaml to Authelia GID ({{ users['authelia'] + uid_shift }})"
file:
path: "{{ project_dir }}/configuration.yml"
group: "{{ users['authelia'] + uid_shift }}"
become: true