@@ -19,6 +19,16 @@ Role Variables
19
19
- ` libvirt_vm_image_cache_path ` : The directory in which to cache downloaded
20
20
images. Default is "/tmp/".
21
21
22
+ - ` libvirt_volume_default_images_path ` : Directory in which instance images are
23
+ stored. Default is '/var/lib/libvirt/images'.
24
+
25
+ - ` libvirt_volume_default_type ` : What type of backing volume does the instance use? Default is ` volume ` .
26
+
27
+ - ` libvirt_volume_default_format ` : Format for volumes created by the role, Default is ` qcow2 ` .
28
+
29
+ - ` libvirt_volume_default_device ` : Control how device appears in guest OS. Defaults to ` disk ` .
30
+
31
+
22
32
- ` libvirt_vm_engine ` : virtualisation engine. If not set, the role will attempt
23
33
to auto-detect the optimal engine to use.
24
34
@@ -36,6 +46,9 @@ Role Variables
36
46
- ` libvirt_vm_virsh_default_env ` : Variables contained within this dictionary are
37
47
added to the environment used when executing virsh commands.
38
48
49
+ - ` libvirt_vm_clock_offset ` . If defined the instances clock offset is set to
50
+ the provided value. When undefined sync is set to ` localtime ` .
51
+
39
52
- ` libvirt_vms ` : list of VMs to be created/destroyed. Each one may have the
40
53
following attributes:
41
54
@@ -55,11 +68,17 @@ Role Variables
55
68
` libvirt_vm_engine ` is ` kvm ` , otherwise ` host-model ` . Can be set to none
56
69
to not configure a cpu mode.
57
70
71
+ - ` clock_offset ` : Overrides default set in ` libvirt_vm_clock_offset `
72
+
73
+ - ` enable_vnc ` : If true enables VNC listening on localhost for use with
74
+ VirtManager and similar tools
75
+
58
76
- ` volumes ` : a list of volumes to attach to the VM. Each volume is
59
77
defined with the following dict:
60
78
- ` pool ` : Name or UUID of the storage pool from which the volume should be
61
79
allocated.
62
- - ` name ` : Name to associate with the volume being created.
80
+ - ` name ` : Name to associate with the volume being created; For ` file ` type volumes include extension if you would like volumes created with one.
81
+ - ` file_path ` : Where the image of ` file ` type volumes should be placed; defaults to ` libvirt_volume_default_images_path `
63
82
- ` capacity ` : volume capacity (can be suffixed with M,G,T or MB,GB,TB, etc)
64
83
- ` device ` : ` disk `
65
84
- ` format ` : options include ` raw ` , ` qcow2 ` , ` vmdk ` . See ` man virsh ` for the
@@ -80,6 +99,7 @@ Role Variables
80
99
- ` network ` : Name of the network to which an interface should be
81
100
attached. Must be specified if and only if the interface ` type ` is
82
101
` network ` .
102
+ - ` mac ` : "Hardware" address of the virtual instance, if absent one is created
83
103
- ` source ` : A dict defining the host interface to which this
84
104
VM interface should be attached. Must be specified if and only if the
85
105
interface ` type ` is ` direct ` . Includes the following attributes:
@@ -154,8 +174,18 @@ Example Playbook
154
174
format: 'qcow2'
155
175
capacity: '200GB'
156
176
pool: 'my-pool'
177
+ - name: 'filestore'
178
+ type: 'file'
179
+ file_path: '/srv/cloud/images'
180
+ capacity: '900GB'
157
181
interfaces:
158
- - network: 'br-datacentre'
182
+ - type: 'direct'
183
+ source:
184
+ dev: 'eth123'
185
+ mode: 'private'
186
+ - type: 'bridge'
187
+ source:
188
+ dev: 'br-datacentre'
159
189
160
190
161
191
Author Information
0 commit comments