26 lines
870 B
YAML
26 lines
870 B
YAML
- name: "Create {{ vaultwarden_project_dir }} project directory"
|
||
file:
|
||
path: "{{ vaultwarden_project_dir }}"
|
||
state: directory
|
||
|
||
- name: Template docker-compose.yaml to project directory
|
||
template:
|
||
src: docker-compose.yaml
|
||
dest: "{{ vaultwarden_project_dir }}/docker-compose.yaml"
|
||
owner: "{{ ansible_env['USER'] }}"
|
||
group: "{{ ansible_env['USER'] }}"
|
||
mode: '640'
|
||
|
||
- name: "Create directory {{ volumes['vaultwarden_datadir'] }} with correct permissions"
|
||
file:
|
||
path: "{{ volumes['vaultwarden_datadir'] }}"
|
||
state: directory
|
||
owner: "{{ users['vaultwarden'] + uid_shift }}"
|
||
group: "{{ users['vaultwarden'] + uid_shift }}"
|
||
mode: '770'
|
||
become: true
|
||
|
||
- name: Pull/Create/Restart project services
|
||
community.docker.docker_compose:
|
||
project_src: "{{ vaultwarden_project_dir }}"
|
||
pull: "{{ docker_pull_images | bool }}"
|