Ansiblize rclone mounts configs
This commit is contained in:
parent
251d52f1de
commit
7fbfbbb699
3 changed files with 30 additions and 1 deletions
|
@ -0,0 +1 @@
|
||||||
|
upload: upload
|
|
@ -0,0 +1,7 @@
|
||||||
|
[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
|
|
@ -1,3 +1,6 @@
|
||||||
|
- name: Include upload variables
|
||||||
|
include_vars: ../upload/vars/upload.yml
|
||||||
|
|
||||||
- name: Create duplicati directory
|
- name: Create duplicati directory
|
||||||
file:
|
file:
|
||||||
path: /opt/duplicati
|
path: /opt/duplicati
|
||||||
|
@ -16,6 +19,24 @@
|
||||||
register: compose_file
|
register: compose_file
|
||||||
become: true
|
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
|
- name: Cycle duplicati container
|
||||||
docker_compose:
|
docker_compose:
|
||||||
project_src: /opt/duplicati
|
project_src: /opt/duplicati
|
||||||
|
@ -23,7 +44,7 @@
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
remove_volumes: true
|
remove_volumes: true
|
||||||
state: "{{ item }}"
|
state: "{{ item }}"
|
||||||
when: compose_file.changed
|
when: compose_file.changed or rclone_config.changed or rclone_mounts.changed
|
||||||
loop:
|
loop:
|
||||||
- absent
|
- absent
|
||||||
- present
|
- present
|
||||||
|
|
Loading…
Reference in a new issue