fix: honor libvirt network config, preserve DHCP DNS with search-only NM config, and exact-match Xen VM names
This commit is contained in:
@@ -101,7 +101,11 @@
|
||||
when: hypervisor_type == "xen"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- hostname not in system_check_xen_existing_vms.stdout | default('')
|
||||
- >-
|
||||
not (
|
||||
system_check_xen_existing_vms.stdout | default('')
|
||||
is search('(?m)^' ~ (hostname | ansible.builtin.regex_escape) ~ '\\s+\\d+\\s')
|
||||
)
|
||||
fail_msg: |
|
||||
VM {{ hostname }} already exists on Xen hypervisor.
|
||||
To avoid data loss, the playbook will not overwrite or delete existing VMs.
|
||||
|
||||
Reference in New Issue
Block a user