add trottle to backups
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
- name: Centralized Restic Fleet Backup with Systemd Hooks
|
||||
hosts: app_data,app_docker,home_grail
|
||||
become: true
|
||||
serial: 5
|
||||
serial: 1
|
||||
|
||||
vars:
|
||||
# Map of group -> {label, path}. A host can belong to more than one of
|
||||
@@ -55,6 +55,7 @@
|
||||
env: *restic_env
|
||||
register: restic_unlock_result
|
||||
failed_when: restic_unlock_result.status != 0
|
||||
throttle: 1
|
||||
|
||||
- name: Init restic repo (per target)
|
||||
community.docker.docker_container:
|
||||
@@ -74,6 +75,7 @@
|
||||
loop: "{{ backup_targets }}"
|
||||
loop_control:
|
||||
label: "{{ item.label }}"
|
||||
throttle: 1
|
||||
|
||||
- name: Run restic backup (per target)
|
||||
community.docker.docker_container:
|
||||
@@ -95,6 +97,7 @@
|
||||
loop: "{{ backup_targets }}"
|
||||
loop_control:
|
||||
label: "{{ item.label }}"
|
||||
throttle: 1
|
||||
|
||||
- name: Show backup output
|
||||
ansible.builtin.debug:
|
||||
@@ -122,8 +125,10 @@
|
||||
loop: "{{ backup_targets }}"
|
||||
loop_control:
|
||||
label: "{{ item.label }}"
|
||||
throttle: 1
|
||||
|
||||
always:
|
||||
- name: Ensure the application is started back up
|
||||
ansible.builtin.systemd:
|
||||
name: app
|
||||
state: started
|
||||
state: started
|
||||
|
||||
Reference in New Issue
Block a user