kvm-host: add missing default value

This commit is contained in:
Jérémy Lecour 2022-02-03 14:16:09 +01:00 committed by Jérémy Lecour
parent 5153b88d01
commit 9e27d9707b
3 changed files with 14 additions and 3 deletions

View file

@ -13,6 +13,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
### Added
* evolinux-base: option to bypass raid-related tasks
* kvm-host: add missing default value
### Changed

View file

@ -1,4 +1,6 @@
---
kvm_custom_libvirt_images_path: ''
kvm_install_drbd: True
kvm_scripts_dir: /usr/local/sbin
kvm_scripts_dir: /usr/local/sbin
kvm_pair: null

View file

@ -34,7 +34,11 @@
special_time: "hourly"
user: root
job: "rsync -a --delete /etc/libvirt/qemu/*xml {{ hostvars[kvm_pair]['lan.ip'] }}:/root/libvirt-{{ inventory_hostname }}/"
when: kvm_pair != inventory_hostname
when:
- kvm_pair is defined
- kvm_pair is not none
- kvm_pair | length > 0
- kvm_pair != inventory_hostname
tags: crontab
- name: Crontab for sync list of running vm
@ -44,5 +48,9 @@
special_time: "daily"
user: root
job: "virsh list --all | tee /root/virsh-list.txt | ssh {{ hostvars[kvm_pair]['lan.ip'] }} 'cat >/root/libvirt-{{ inventory_hostname }}/virsh-list.txt'"
when: kvm_pair != inventory_hostname
when:
- kvm_pair is defined
- kvm_pair is not none
- kvm_pair | length > 0
- kvm_pair != inventory_hostname
tags: crontab