forked from evolix/ansible-roles
Check if /etc/libvirt/qemu/*xml exists before sync
This will prevent sending e-mails saying the file does not exists.
This commit is contained in:
parent
9c84e95182
commit
d455de52b3
|
@ -33,7 +33,7 @@
|
|||
state: present
|
||||
special_time: "hourly"
|
||||
user: root
|
||||
job: "rsync -a --delete /etc/libvirt/qemu/*xml {{ hostvars[kvm_pair]['lan.ip'] }}:/root/libvirt-{{ inventory_hostname }}/"
|
||||
job: "if ! ls /etc/libvirt/qemu/*xml > /dev/null 2> /dev/null; then rsync -a --delete /etc/libvirt/qemu/*xml {{ hostvars[kvm_pair]['lan.ip'] }}:/root/libvirt-{{ inventory_hostname }}/; fi"
|
||||
when:
|
||||
- kvm_pair is defined
|
||||
- kvm_pair is not none
|
||||
|
|
Loading…
Reference in a new issue