kolla-ansible/ansible/roles/chrony/tasks/config.yml
Eduardo Gonzalez e01900b3ce Fix chrony genconfig
Closes-Bug: #1665047
Change-Id: Ief0813e4f505574c9b8eee8a59765dadbac474ed
2017-02-15 17:27:36 +00:00

46 lines
1.2 KiB
YAML

---
- name: Ensuring config directories exist
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
recurse: yes
with_items:
- "chrony"
- name: Copying over config.json files for services
template:
src: "{{ item }}.json.j2"
dest: "{{ node_config_directory }}/{{ item }}/config.json"
with_items:
- "chrony"
notify:
- Restart chrony container
- name: Copying over chrony.conf
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/chrony/chrony.conf"
with_first_found:
- "{{ node_custom_config }}/chrony/{{ inventory_hostname }}/chrony.conf"
- "{{ node_custom_config }}/chrony/chrony.conf"
- "chrony.conf.j2"
notify:
- Restart chrony container
- name: Check chrony container
kolla_docker:
action: "compare_container"
common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}"
privileged: "{{ item.value.privileged }}"
volumes: "{{ item.value.volumes }}"
when:
- action != "config"
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ chrony_services }}"
notify:
- Restart chrony container