Xen: Update and allow forced time service

This commit is contained in:
Sven Velt 2020-12-03 16:08:51 +01:00
parent 6ea351eca5
commit aec0417513

View file

@ -118,23 +118,24 @@
### Xen-Guests: https://wiki.xen.org/wiki/Xen_FAQ_DomU#How_can_i_synchronize_a_dom0_clock.3F
### Xen-Guests:
# Old: https://wiki.xen.org/wiki/Xen_FAQ_DomU#How_can_i_synchronize_a_dom0_clock.3F
# New: /sys/devices/system/clocksource/clocksource0/current_clocksource → "xen"
- hosts:
- virtguest_xen
gather_facts: no
pre_tasks:
- shell: 'cat /proc/sys/xen/independent_wallclock || echo 1'
- shell: 'cat /proc/sys/xen/independent_wallclock || cat /sys/devices/system/clocksource/clocksource0/current_clocksource'
changed_when: False
register: independent_wallclock
- assert:
that:
- independent_wallclock.stdout == "1"
register: timesync_clocksource
roles:
- timesync-enabled
- role: timesync-disabled
when: timesync_clocksource.stdout in ["1", "xen"] and not timesync_force
- role: timesync-enabled
when: timesync_clocksource.stdout not in ["1", "xen"] or timesync_force