Separate backups start/stop from main playbook

This commit is contained in:
Wojciech Kozlowski 2023-02-12 14:16:59 +01:00
parent a8d1a9e9b2
commit 730b616640
16 changed files with 44 additions and 16 deletions

View File

@ -2,7 +2,7 @@
- name: "backups : yggdrasil"
hosts: "yggdrasil"
roles:
- role: "backups/snapshots"
tags: "backups:snapshots"
- role: "backups/restic"
tags: "backups:restic"
- role: "backups/snapshots/setup"
tags: "backups:snapshots:setup"
- role: "backups/restic/setup"
tags: "backups:restic:setup"

View File

@ -0,0 +1,8 @@
---
- name: "backups : yggdrasil"
hosts: "yggdrasil"
roles:
- role: "backups/snapshots/start"
tags: "backups:snapshots:start"
- role: "backups/restic/start"
tags: "backups:restic:start"

View File

@ -0,0 +1,8 @@
---
- name: "backups : yggdrasil"
hosts: "yggdrasil"
roles:
- role: "backups/snapshots/stop"
tags: "backups:snapshots:stop"
- role: "backups/restic/stop"
tags: "backups:restic:stop"

View File

@ -62,9 +62,3 @@
when:
backups_restic_restic_batch_service_file.changed or
backups_restic_restic_batch_timer_file.changed
- name: "enable and start restic-batch service"
ansible.builtin.systemd:
name: "restic-batch.timer"
enabled: true
state: "started"

View File

@ -0,0 +1,6 @@
---
- name: "enable and start restic-batch service"
ansible.builtin.systemd:
name: "restic-batch.timer"
enabled: true
state: "started"

View File

@ -0,0 +1,6 @@
---
- name: "disable and stop restic-batch service"
ansible.builtin.systemd:
name: "restic-batch.timer"
enabled: false
state: "stopped"

View File

@ -62,9 +62,3 @@
ansible.builtin.systemd:
name: "syncoid-batch.service"
enabled: true
- name: "enable sanoid service"
ansible.builtin.systemd:
name: "sanoid.timer"
enabled: true
state: "started"

View File

@ -0,0 +1,6 @@
---
- name: "enable and start sanoid service"
ansible.builtin.systemd:
name: "sanoid.timer"
enabled: true
state: "started"

View File

@ -0,0 +1,6 @@
---
- name: "disable and stop sanoid service"
ansible.builtin.systemd:
name: "sanoid.timer"
enabled: false
state: "stopped"