ansible_role_restic/tasks/run_backup.yml

11 lines
350 B
YAML
Raw Permalink Normal View History

---
- name: (RUN BACKUP) Run backup script
ansible.builtin.command:
cmd: "/usr/bin/env {{ restic_backup_script_shell }} {{ restic_script_dir }}/backup-{{ item.name | replace(' ', '') }}.sh"
2023-08-31 15:00:19 +02:00
no_log: "{{ restic_no_log }}"
with_items: '{{ restic_backups }}'
when:
- item.name is defined
register: result
changed_when: result.rc != 0