1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_restic.git synced 2024-12-11 23:41:32 +01:00

Run backup with loop of restic_backups

This commit is contained in:
Ben 2023-08-31 09:00:19 -04:00
parent 31a0197256
commit 35d890bb1e
2 changed files with 8 additions and 0 deletions

View file

@ -2,3 +2,7 @@
- name: (RUN BACKUP) Run backup script - name: (RUN BACKUP) Run backup script
ansible.builtin.shell: ansible.builtin.shell:
cmd: "{{ restic_script_dir }}/backup-{{ item.name | replace(' ', '') }}.sh" cmd: "{{ restic_script_dir }}/backup-{{ item.name | replace(' ', '') }}.sh"
no_log: "{{ restic_no_log }}"
with_items: '{{ restic_backups }}'
when:
- item.name is defined

4
tasks/run_backup.yml~ Normal file
View file

@ -0,0 +1,4 @@
---
- name: (RUN BACKUP) Run backup script
ansible.builtin.shell:
cmd: "{{ restic_script_dir }}/backup-{{ item.name | replace(' ', '') }}.sh"