1
1
---
2
- # State of the VM. May be 'present' or 'absent'.
3
- libvirt_vm_state : present
4
2
5
- # Name of the VM.
6
- libvirt_vm_name :
7
-
8
- # Memory in MB.
9
- libvirt_vm_memory_mb :
3
+ # Path to cache downloaded images.
4
+ libvirt_image_cache_path :
10
5
11
- # Number of vCPUs .
12
- libvirt_vm_vcpus :
6
+ # CPU architecture .
7
+ libvirt_vm_arch : x86_64
13
8
14
9
# Virtualisation engine. If not set, the role will attempt to auto-detect the
15
10
# optimal engine to use.
@@ -19,26 +14,49 @@ libvirt_vm_engine:
19
14
# correct emulator to use.
20
15
libvirt_vm_emulator :
21
16
22
- # CPU architecture.
23
- libvirt_vm_arch : x86_64
17
+ # A list of specifications of VMs to be created.
18
+ # For backwards compatibility, libvirt_vms defaults to a singleton list using
19
+ # the values of the deprecated variables below.
20
+ # See README.md or tasks/main.yml for these attributes' defaults.
21
+ libvirt_vms :
22
+ # State of the VM. May be 'present' or 'absent'.
23
+ - state : " {{ libvirt_vm_state }}"
24
24
25
- # Virtual machine type .
26
- libvirt_vm_machine : " {{ None if libvirt_vm_engine == 'kvm' else 'pc-1.0' }}"
25
+ # Name of the VM .
26
+ name : " {{ libvirt_vm_name }}"
27
27
28
- # Virtual machine CPU mode .
29
- libvirt_vm_cpu_mode : " {{ 'host-passthrough' if libvirt_vm_engine == 'kvm' else 'host-model' }}"
28
+ # Memory in MB .
29
+ memory_mb : " {{ libvirt_vm_memory_mb }}"
30
30
31
- # List of volumes .
32
- libvirt_vm_volumes : []
31
+ # Number of vCPUs .
32
+ vcpus : " {{ libvirt_vm_vcpus }} "
33
33
34
- # List of network interfaces .
35
- libvirt_vm_interfaces : []
34
+ # Virtual machine type .
35
+ machine : " {{ libvirt_vm_machine }} "
36
36
37
- # Path to console log file.
38
- libvirt_vm_console_log_path : " /var/log/libvirt-consoles/{{ libvirt_vm_name }}.log"
37
+ # Virtual machine CPU mode.
38
+ cpu_mode : " {{ libvirt_vm_cpu_mode }}"
39
+
40
+ # List of volumes.
41
+ volumes : " {{ libvirt_vm_volumes }}"
42
+
43
+ # List of network interfaces.
44
+ interfaces : " {{ libvirt_vm_interfaces }}"
45
+
46
+ # Path to console log file.
47
+ console_log_path : " {{ libvirt_vm_console_log_path }}"
39
48
40
- # Path to cache downloaded images.
41
- libvirt_vm_image_cache_path :
42
49
43
- # List of authorized SSH public keys.
44
- # libvirt_vm_public_keys: []
50
+ # ## DEPRECATED ###
51
+ # Use the above settings for each item within `libvirt_vms`, instead of the
52
+ # below deprecated variables.
53
+
54
+ libvirt_vm_state :
55
+ libvirt_vm_name :
56
+ libvirt_vm_memory_mb :
57
+ libvirt_vm_vcpus :
58
+ libvirt_vm_machine :
59
+ libvirt_vm_cpu_mode :
60
+ libvirt_vm_volumes :
61
+ libvirt_vm_interfaces :
62
+ libvirt_vm_console_log_path :
0 commit comments