Xen: Update and allow forced time service
This commit is contained in:
parent
6ea351eca5
commit
aec0417513
17
timesync.yml
17
timesync.yml
|
@ -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:
|
- hosts:
|
||||||
- virtguest_xen
|
- virtguest_xen
|
||||||
|
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
|
||||||
pre_tasks:
|
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
|
changed_when: False
|
||||||
register: independent_wallclock
|
register: timesync_clocksource
|
||||||
|
|
||||||
- assert:
|
|
||||||
that:
|
|
||||||
- independent_wallclock.stdout == "1"
|
|
||||||
|
|
||||||
roles:
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue