From aec0417513624f5535d83406556ceb64769f54b4 Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Thu, 3 Dec 2020 16:08:51 +0100 Subject: [PATCH] Xen: Update and allow forced time service --- timesync.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/timesync.yml b/timesync.yml index 8993fe8..3e5af7b 100644 --- a/timesync.yml +++ b/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: - 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