timesync.yml cleanup + timesync_force_clean
This commit is contained in:
parent
bf49a7682d
commit
6ea351eca5
19
timesync.yml
19
timesync.yml
|
@ -2,11 +2,19 @@
|
||||||
### Create groups
|
### Create groups
|
||||||
- hosts: all
|
- hosts: all
|
||||||
|
|
||||||
tasks:
|
pre_tasks:
|
||||||
- name: Group hosts by virt role
|
- name: Group hosts by virt role
|
||||||
group_by:
|
group_by:
|
||||||
key: "virt_{{ ansible_virtualization_role }}"
|
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
|
- hosts: virt_guest
|
||||||
|
|
||||||
|
@ -18,15 +26,6 @@
|
||||||
key: "virtguest_{{ ansible_virtualization_type }}"
|
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: Install/Configure NTP
|
||||||
- hosts:
|
- hosts:
|
||||||
|
|
Loading…
Reference in a new issue