kayobe/ansible/time.yml

34 lines
682 B
YAML

---
- name: Ensure timezone is configured
hosts: seed-hypervisor:seed:overcloud
tags:
- timezone
tasks:
- import_role:
name: yatesr.timezone
become: True
- name: Ensure ntp group exists
hosts: all
gather_facts: no
tags:
- ntp
tasks:
- name: Ensure ntp group exists
fail:
msg: >-
The 'ntp' group does not exist in the Ansible inventory.
run_once: true
when:
- "'ntp' not in groups"
- not kolla_enable_chrony | bool
- name: Ensure Chrony is installed and configured
hosts: ntp
tags:
- ntp
tasks:
- import_role:
name: ntp
when: not kolla_enable_chrony | bool