infrastructure/ansible/roles/intersect-docker/tasks/duplicati.yml
Jake Howard cd255f7ca2
Remove docker-rclone-mount
Seems there's some issues where having this attached which makes the duplicati container delete all its RO mounts.
2020-05-22 21:09:40 +01:00

29 lines
736 B
YAML

- name: Create duplicati directory
file:
path: /opt/duplicati
state: directory
owner: "{{ docker_user.name }}"
mode: "{{ docker_compose_directory_mask }}"
become: true
- name: Install duplicati compose file
template:
src: files/duplicati/docker-compose.yml
dest: /opt/duplicati/docker-compose.yml
mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}"
validate: /usr/bin/docker-compose -f %s config
register: compose_file
become: true
- name: Cycle duplicati container
docker_compose:
project_src: /opt/duplicati
pull: true
remove_orphans: true
remove_volumes: true
state: "{{ item }}"
when: compose_file.changed
loop:
- absent
- present