From 6ea351eca520c099475da36d85b83f6fd43689a1 Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Thu, 3 Dec 2020 16:07:27 +0100 Subject: [PATCH] timesync.yml cleanup + timesync_force_clean --- timesync.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/timesync.yml b/timesync.yml index a4ce28e..8993fe8 100644 --- a/timesync.yml +++ b/timesync.yml @@ -2,11 +2,19 @@ ### Create groups - hosts: all - tasks: + pre_tasks: - name: Group hosts by virt role group_by: key: "virt_{{ ansible_virtualization_role }}" + - name: See if timesync service should be forced + set_fact: + timesync_force: timesync_servers is defined or timesync_pools is defined + + roles: + - role: timesync-disabled + when: timesync_force_clean|default(False) + - hosts: virt_guest @@ -18,15 +26,6 @@ key: "virtguest_{{ ansible_virtualization_type }}" -# Debugging only -- hosts: all - - gather_facts: no - - tasks: - - set_fact: - timesync_force: timesync_servers is defined or timesync_pools is defined - ### Hosts: Install/Configure NTP - hosts: