File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ Role Variables
1616 VM console logs, if a VM-specific log file path is not given. Default is
1717 "/var/log/libvirt/qemu/".
1818
19+ - ` libvirt_vm_default_uuid_deterministic ` : Whether UUID should be calculated by
20+ hashing the VM name. If not, the UUID is randomly generated by libvirt when
21+ the VM is defined. Default is False.
22+
1923- ` libvirt_vm_image_cache_path ` : The directory in which to cache downloaded
2024 images. Default is "/tmp/".
2125
@@ -64,6 +68,12 @@ Role Variables
6468
6569 - ` name ` : the name to assign to the VM.
6670
71+ - ` uuid ` : the UUID to manually assign to the VM. If specified, neither
72+ ` uuid_deterministic ` nor ` libvirt_vm_default_uuid_deterministic ` are used.
73+
74+ - ` uuid_deterministic ` : overrides default set in
75+ ` libvirt_vm_default_uuid_deterministic `
76+
6777 - ` memory_mb ` : the memory to assign to the VM, in megabytes.
6878
6979 - ` vcpus ` : the number of VCPU cores to assign to the VM.
Original file line number Diff line number Diff line change 44# file path is not given.
55libvirt_vm_default_console_log_dir : " /var/log/libvirt-consoles/"
66
7+ # Whether UUID should be calculated by hashing the VM name. If not, the UUID is
8+ # randomly generated by libvirt when the VM is defined.
9+ libvirt_vm_default_uuid_deterministic : False
10+
711# The default location for libvirt images
812libvirt_volume_default_images_path : ' /var/lib/libvirt/images'
913
Original file line number Diff line number Diff line change 11<domain type =' {{ libvirt_vm_engine }}' >
22 <name >{{ vm.name }}</name >
3+ {% if vm .uuid is defined %}
4+ <uuid >{{ vm.uuid }}</uuid >
5+ {% elif (libvirt_vm_default_uuid_deterministic | bool ) or (vm .uuid_deterministic is defined and (vm .uuid_deterministic | bool )) %}
6+ <uuid >{{ vm.name | to_uuid }}</uuid >
7+ {% endif %}
38 <memory >{{ vm.memory_mb | int * 1024 }}</memory >
49 <vcpu >{{ vm.vcpus }}</vcpu >
510 {% if vm .clock_offset |default ( libvirt_vm_clock_offset ) %}
You can’t perform that action at this time.
0 commit comments