29 lines
744 B
YAML
29 lines
744 B
YAML
|
- name: "(Re)Create {{ project_dir }} project directory"
|
||
|
file:
|
||
|
path: "{{ project_dir }}"
|
||
|
state: "{{ item }}"
|
||
|
loop:
|
||
|
- absent
|
||
|
- directory
|
||
|
|
||
|
- name: Template docker-compose.yaml & .env to project directory
|
||
|
template:
|
||
|
src: "{{ item }}"
|
||
|
dest: "{{ project_dir }}/{{ item }}"
|
||
|
owner: "{{ host_uid }}"
|
||
|
group: "{{ host_uid }}"
|
||
|
mode: '640'
|
||
|
loop:
|
||
|
- docker-compose.yaml
|
||
|
- .env
|
||
|
|
||
|
- name: "Create (if not exists) directory {{ volumes['vaultwarden_datadir'] }} & set permissions"
|
||
|
file:
|
||
|
path: "{{ volumes['vaultwarden_datadir'] }}"
|
||
|
state: directory
|
||
|
recurse: true
|
||
|
owner: "{{ users['vaultwarden'] + uid_shift }}"
|
||
|
group: "{{ users['vaultwarden'] + uid_shift }}"
|
||
|
mode: '770'
|
||
|
become: true
|