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" - name: "backups : yggdrasil"
hosts: "yggdrasil" hosts: "yggdrasil"
roles: roles:
- role: "backups/snapshots" - role: "backups/snapshots/setup"
tags: "backups:snapshots" tags: "backups:snapshots:setup"
- role: "backups/restic" - role: "backups/restic/setup"
tags: "backups:restic" 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: when:
backups_restic_restic_batch_service_file.changed or backups_restic_restic_batch_service_file.changed or
backups_restic_restic_batch_timer_file.changed 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: ansible.builtin.systemd:
name: "syncoid-batch.service" name: "syncoid-batch.service"
enabled: true 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"