From 35d890bb1e5736cb80aa75fd21d21d93a72ae950 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 31 Aug 2023 09:00:19 -0400 Subject: [PATCH] Run backup with loop of restic_backups --- tasks/run_backup.yml | 4 ++++ tasks/run_backup.yml~ | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 tasks/run_backup.yml~ diff --git a/tasks/run_backup.yml b/tasks/run_backup.yml index 1368d22..9bc5eea 100644 --- a/tasks/run_backup.yml +++ b/tasks/run_backup.yml @@ -2,3 +2,7 @@ - name: (RUN BACKUP) Run backup script ansible.builtin.shell: cmd: "{{ restic_script_dir }}/backup-{{ item.name | replace(' ', '') }}.sh" + no_log: "{{ restic_no_log }}" + with_items: '{{ restic_backups }}' + when: + - item.name is defined diff --git a/tasks/run_backup.yml~ b/tasks/run_backup.yml~ new file mode 100644 index 0000000..1368d22 --- /dev/null +++ b/tasks/run_backup.yml~ @@ -0,0 +1,4 @@ +--- +- name: (RUN BACKUP) Run backup script + ansible.builtin.shell: + cmd: "{{ restic_script_dir }}/backup-{{ item.name | replace(' ', '') }}.sh"