Files
kayobe/ansible/stop-chrony.yml
Will Szumski 114b92905a Only stop chrony on nodes in kolla inventory
If docker is not installed this task will currently fail.

Change-Id: I0d3c7865eab71e0020bdb4646550d8ae27e31458
Story: 2006247
Task: 37391
2019-11-08 13:53:03 +00:00

29 lines
1.0 KiB
YAML

---
# NOTE(mgoddard): In the Rocky release, Kolla Ansible enabled the chrony
# container by default. Running this alongside the NTP daemon on the host is
# likely to cause issues, so we should explicitly disable it. Kolla Ansible
# won't automatically stop the container, so we do it here if it is disabled.
# See https://storyboard.openstack.org/#!/story/2005272.
- name: Stop the chrony container
hosts: overcloud
vars:
# kolla_overcloud_inventory_top_level_group_map looks like:
# kolla_overcloud_inventory_top_level_group_map:
# control:
# groups:
# - controllers
overcloud_nodes_in_kolla_inventory: >-
{{ kolla_overcloud_inventory_top_level_group_map.values() |
map(attribute='groups') | flatten | unique | join(':') }}
tags:
- stop-chrony
tasks:
- name: Stop the chrony container
docker_container:
name: chrony
state: absent
when:
- not kolla_enable_chrony | bool
- inventory_hostname in query('inventory_hostnames', overcloud_nodes_in_kolla_inventory)