From cd255f7ca2bd5d622750a30dc70822db8801d04d Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 22 May 2020 21:09:40 +0100 Subject: [PATCH] Remove `docker-rclone-mount` Seems there's some issues where having this attached which makes the duplicati container delete all its RO mounts. --- .../files/duplicati/docker-compose.yml | 18 --------------- .../files/duplicati/rclone-mounts.txt | 1 - .../files/duplicati/rclone.conf | 7 ------ .../intersect-docker/tasks/duplicati.yml | 23 +------------------ 4 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 ansible/roles/intersect-docker/files/duplicati/rclone-mounts.txt delete mode 100644 ansible/roles/intersect-docker/files/duplicati/rclone.conf diff --git a/ansible/roles/intersect-docker/files/duplicati/docker-compose.yml b/ansible/roles/intersect-docker/files/duplicati/docker-compose.yml index b857e77..4c58479 100644 --- a/ansible/roles/intersect-docker/files/duplicati/docker-compose.yml +++ b/ansible/roles/intersect-docker/files/duplicati/docker-compose.yml @@ -13,27 +13,9 @@ services: - /srv/nextcloud-data/data/:/source/nextcloud:ro - /opt/gitea/repos/repositories:/source/repositories:ro - /scratch/db-backups:/source/db-backups:ro - - ./mounts:/source/mounts:shared restart: unless-stopped labels: - "traefik.enable=true" - "traefik.http.routers.duplicati.rule=Host(`duplicati.jakehoward.tech`)" - "traefik.http.routers.duplicati.tls.certresolver=le" - "traefik.http.routers.duplicati.middlewares=internal-only@file" - - rclone: - image: theorangeone/rclone-mount:latest - restart: unless-stopped - cap_add: - - SYS_ADMIN - security_opt: - - apparmor:unconfined - environment: - - PUID={{ docker_user.id }} - - PGID={{ docker_user.id }} - devices: - - "/dev/fuse:/dev/fuse" - volumes: - - ./mounts:/mnt:shared - - ./rclone-mounts.txt:/config/config.txt:ro - - ./rclone.conf:/config/rclone.conf:ro diff --git a/ansible/roles/intersect-docker/files/duplicati/rclone-mounts.txt b/ansible/roles/intersect-docker/files/duplicati/rclone-mounts.txt deleted file mode 100644 index dec555a..0000000 --- a/ansible/roles/intersect-docker/files/duplicati/rclone-mounts.txt +++ /dev/null @@ -1 +0,0 @@ -upload: upload diff --git a/ansible/roles/intersect-docker/files/duplicati/rclone.conf b/ansible/roles/intersect-docker/files/duplicati/rclone.conf deleted file mode 100644 index ca5c538..0000000 --- a/ansible/roles/intersect-docker/files/duplicati/rclone.conf +++ /dev/null @@ -1,7 +0,0 @@ -[upload] -type = s3 -provider = Minio -env_auth = false -access_key_id = {{ minio_access_key }} -secret_access_key = {{ minio_secret_key }} -endpoint = https://upload.theorangeone.net diff --git a/ansible/roles/intersect-docker/tasks/duplicati.yml b/ansible/roles/intersect-docker/tasks/duplicati.yml index e828807..92dd43e 100644 --- a/ansible/roles/intersect-docker/tasks/duplicati.yml +++ b/ansible/roles/intersect-docker/tasks/duplicati.yml @@ -1,6 +1,3 @@ -- name: Include upload variables - include_vars: ../upload/vars/upload.yml - - name: Create duplicati directory file: path: /opt/duplicati @@ -19,24 +16,6 @@ register: compose_file become: true -- name: Install rclone config - template: - src: files/duplicati/rclone.conf - dest: /opt/duplicati/rclone.conf - mode: "{{ docker_compose_file_mask }}" - owner: "{{ docker_user.name }}" - register: rclone_config - become: true - -- name: Install rclone mounts - template: - src: files/duplicati/rclone-mounts.txt - dest: /opt/duplicati/rclone-mounts.txt - mode: "{{ docker_compose_file_mask }}" - owner: "{{ docker_user.name }}" - register: rclone_mounts - become: true - - name: Cycle duplicati container docker_compose: project_src: /opt/duplicati @@ -44,7 +23,7 @@ remove_orphans: true remove_volumes: true state: "{{ item }}" - when: compose_file.changed or rclone_config.changed or rclone_mounts.changed + when: compose_file.changed loop: - absent - present