Separate backups start/stop from main playbook
This commit is contained in:
parent
a8d1a9e9b2
commit
730b616640
@ -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"
|
||||
|
8
playbooks/backups_start.yml
Normal file
8
playbooks/backups_start.yml
Normal 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"
|
8
playbooks/backups_stop.yml
Normal file
8
playbooks/backups_stop.yml
Normal 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"
|
@ -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"
|
6
playbooks/roles/backups/restic/start/tasks/main.yml
Normal file
6
playbooks/roles/backups/restic/start/tasks/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: "enable and start restic-batch service"
|
||||
ansible.builtin.systemd:
|
||||
name: "restic-batch.timer"
|
||||
enabled: true
|
||||
state: "started"
|
6
playbooks/roles/backups/restic/stop/tasks/main.yml
Normal file
6
playbooks/roles/backups/restic/stop/tasks/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: "disable and stop restic-batch service"
|
||||
ansible.builtin.systemd:
|
||||
name: "restic-batch.timer"
|
||||
enabled: false
|
||||
state: "stopped"
|
@ -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"
|
6
playbooks/roles/backups/snapshots/start/tasks/main.yml
Normal file
6
playbooks/roles/backups/snapshots/start/tasks/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: "enable and start sanoid service"
|
||||
ansible.builtin.systemd:
|
||||
name: "sanoid.timer"
|
||||
enabled: true
|
||||
state: "started"
|
6
playbooks/roles/backups/snapshots/stop/tasks/main.yml
Normal file
6
playbooks/roles/backups/snapshots/stop/tasks/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: "disable and stop sanoid service"
|
||||
ansible.builtin.systemd:
|
||||
name: "sanoid.timer"
|
||||
enabled: false
|
||||
state: "stopped"
|
Loading…
Reference in New Issue
Block a user