File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ Role Variables
3636- ` libvirt_vm_virsh_default_env ` : Variables contained within this dictionary are
3737 added to the environment used when executing virsh commands.
3838
39+ - ` libvirt_vm_clock_offset ` . If defined the instances clock offset is set to
40+ the provided value. When undefined sync is set to ` localtime ` .
41+
3942- ` libvirt_vms ` : list of VMs to be created/destroyed. Each one may have the
4043 following attributes:
4144
@@ -55,6 +58,8 @@ Role Variables
5558 ` libvirt_vm_engine ` is ` kvm ` , otherwise ` host-model ` . Can be set to none
5659 to not configure a cpu mode.
5760
61+ - ` clock_offset ` : Overrides default set in ` libvirt_vm_clock_offset `
62+
5863 - ` volumes ` : a list of volumes to attach to the VM. Each volume is
5964 defined with the following dict:
6065 - ` pool ` : Name or UUID of the storage pool from which the volume should be
Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ libvirt_vm_engine:
3535# correct emulator to use.
3636libvirt_vm_emulator :
3737
38+ # Default value for clock syncing. The default (false) uses <clock sync="localtime">
39+ # to configure the instances clock synchronisation. Change to a timezone to make
40+ # configuration use <clock offset="specified offset">
41+ libvirt_vm_clock_offset : False
42+
3843# A list of specifications of VMs to be created.
3944# For backwards compatibility, libvirt_vms defaults to a singleton list using
4045# the values of the deprecated variables below.
Original file line number Diff line number Diff line change 22 <name >{{ vm.name }}</name >
33 <memory >{{ vm.memory_mb | int * 1024 }}</memory >
44 <vcpu >{{ vm.vcpus }}</vcpu >
5+ {% if vm .clock_offset |default ({{ libvirt_vm_clock_offset }}) %}
56 <clock offset =" {{ vm.clock_offset }}" />
7+ {% else %}
8+ <clock sync =" localtime" />
9+ {% endif %}
610 <on _poweroff >destroy</on _poweroff >
711 <on _reboot >restart</on _reboot >
812 <on _crash >destroy</on _crash >
You can’t perform that action at this time.
0 commit comments