Clean up variable organization (wip), better backup/node_exporter for mii, aya01, pi

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
This commit is contained in:
TuDatTr
2023-05-12 11:58:02 +02:00
parent f456c516b3
commit 8b1acb4eb7
16 changed files with 100 additions and 48 deletions

View File

@@ -1,17 +1,18 @@
---
- name: Shut down docker
shell:
cmd: "docker compose down --remove-orphans"
chdir: "{{ docker_compose_dir }}"
systemd:
name: docker
state: stopped
become: true
- name: Backing up for "{{ inventory_hostname }}"
shell:
cmd: "rclone sync {{ item.1 }} secret:{{ item.1 }}"
when: item.0.key == inventory_hostname
loop: "{{ backblaze_paths | dict2items | subelements('value') }}"
cmd: "rclone sync {{ item }} secret:{{ item }} --transfers 16"
loop: "{{ host.backblaze.paths }}"
become: true
- name: Restart docker
shell:
cmd: "docker compose up -d"
chdir: "{{ docker_compose_dir }}"
systemd:
name: docker
state: started
become: true