2024-04-20 12:17:10 +02:00
|
|
|
- name: "(Re)Create {{ project_dir }} project directory"
|
2024-03-31 18:26:05 +02:00
|
|
|
file:
|
|
|
|
path: "{{ project_dir }}"
|
2024-04-20 12:17:10 +02:00
|
|
|
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
|