mirror of
https://github.com/roles-ansible/ansible_role_restic/
synced 2024-11-05 03:23:29 +01:00
Added changed_when and converted to builtin.command
This commit is contained in:
parent
dec516c514
commit
1bed8d3ae6
1 changed files with 4 additions and 2 deletions
|
@ -1,8 +1,10 @@
|
|||
---
|
||||
- name: (RUN BACKUP) Run backup script
|
||||
ansible.builtin.shell:
|
||||
cmd: "{{ restic_script_dir }}/backup-{{ item.name | replace(' ', '') }}.sh"
|
||||
ansible.builtin.command:
|
||||
cmd: "/usr/bin/env sh {{ restic_script_dir }}/backup-{{ item.name | replace(' ', '') }}.sh"
|
||||
no_log: "{{ restic_no_log }}"
|
||||
with_items: '{{ restic_backups }}'
|
||||
when:
|
||||
- item.name is defined
|
||||
register: result
|
||||
changed_when: result.rc != 0
|
||||
|
|
Loading…
Reference in a new issue