vps/roles/vaultwarden/tasks/main.yml

27 lines
869 B
YAML
Raw Normal View History

2024-02-17 19:01:04 +01:00
- 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:
2024-02-17 19:09:53 +01:00
path: "{{ volumes['vaultwarden_datadir'] }}"
2024-02-17 19:01:04 +01:00
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 }}"