085cf7d175
Some hosts in the kayobe inventory might not be in the kolla-ansible inventory so it makes sense for kayobe to manage NTP. Change-Id: Iacb579a46b0e9769a4c404a858d17968f74dd7e0 Depends-On: https://review.opendev.org/c/openstack/kayobe-config-dev/+/786040 Story: 2007872 Task: 40240
28 lines
907 B
YAML
28 lines
907 B
YAML
---
|
|
|
|
- name: Populate service facts.
|
|
service_facts:
|
|
|
|
- name: Mask alternative NTP clients to prevent conflicts
|
|
vars:
|
|
service_exists: "{{ item in services }}"
|
|
systemd:
|
|
name: "{{ item }}"
|
|
enabled: "{{ 'false' if service_exists else omit }}"
|
|
masked: true
|
|
state: "{{ 'stopped' if service_exists else omit }}"
|
|
become: true
|
|
with_items: "{{ ntp_service_disable_list }}"
|
|
|
|
- name: Remove kolla-ansible installed chrony container
|
|
docker_container:
|
|
name: chrony
|
|
state: absent
|
|
become: true
|
|
# NOTE(wszumski): There is an ordering issue where on a fresh host, docker
|
|
# will not have been configured, but if that is the case, the chrony container
|
|
# can't possibly exist, but trying to execute this unconditionally will fail
|
|
# with: No module named 'docker' as we have not yet added the docker package
|
|
# to the kayobe target venv.
|
|
when: "'docker.service' in services"
|