timesync.yml cleanup + timesync_force_clean

This commit is contained in:
Sven Velt 2020-12-03 16:07:27 +01:00
parent bf49a7682d
commit 6ea351eca5

View file

@ -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: