Fix backup VM name for ldap-3

(and potentially other guests where the name differs from the libvirt
domain name)
This commit is contained in:
Râu Cao 2022-10-19 12:51:46 +02:00
parent 82f50b0caa
commit 6d765f959d
Signed by: raucao
GPG Key ID: 15E65F399D084BA9
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ cookbook_file "/root/backups/backup_vm.sh" do
end
# Search all guests and filter by presence on current host
vm_domains = search(:node, "role:kvm_guest").map(&:name) \
vm_domains = search(:node, "role:kvm_guest").map{|n| n["hostname"] } \
& `virsh list --name`.strip.chomp.split("\n")
template "/root/backups/backup_all_vms.sh" do