xoxys.vaultwarden_docker/tasks/setup.yml
Robert Kaussow c347a0d711
All checks were successful
continuous-integration/drone/push Build is passing
migrate dependencies to collections
2020-08-19 18:39:06 +02:00

27 lines
771 B
YAML

---
- block:
- name: Ensure service directory exists
file:
path: "{{ bitwardenrs_service_directory }}"
state: directory
mode: 0755
- name: Deploy compose file to '{{ bitwardenrs_service_directory }}'
template:
src: "services/bitwardenrs_compose.yml.j2"
dest: "{{ bitwardenrs_service_directory }}/docker-compose.yml"
owner: root
group: root
mode: 0640
validate: "docker-compose -f %s config -q"
- name: Ensure service is up and running
docker_compose:
project_src: "{{ bitwardenrs_service_directory }}"
pull: yes
remove_orphans: yes
stopped: "{{ bitwardenrs_service_stopped }}"
state: present
become: True
become_user: root