From e01900b3ced2af55bb1badedcaecfb2fab03a4d0 Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Wed, 15 Feb 2017 00:05:00 +0000 Subject: [PATCH] Fix chrony genconfig Closes-Bug: #1665047 Change-Id: Ief0813e4f505574c9b8eee8a59765dadbac474ed --- ansible/roles/chrony/handlers/main.yml | 4 ++++ ansible/roles/chrony/tasks/config.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ansible/roles/chrony/handlers/main.yml b/ansible/roles/chrony/handlers/main.yml index 25930686d7..7c0b4c8371 100644 --- a/ansible/roles/chrony/handlers/main.yml +++ b/ansible/roles/chrony/handlers/main.yml @@ -10,3 +10,7 @@ name: "{{ service.container_name }}" image: "{{ service.image }}" volumes: "{{ service.volumes }}" + when: + - action != "config" + - inventory_hostname in groups[service.group] + - service.enabled | bool diff --git a/ansible/roles/chrony/tasks/config.yml b/ansible/roles/chrony/tasks/config.yml index db6f1deec9..9afc2f7ffb 100644 --- a/ansible/roles/chrony/tasks/config.yml +++ b/ansible/roles/chrony/tasks/config.yml @@ -36,9 +36,9 @@ privileged: "{{ item.value.privileged }}" volumes: "{{ item.value.volumes }}" when: + - action != "config" - inventory_hostname in groups[item.value.group] - item.value.enabled | bool - - action != "genconfig" with_dict: "{{ chrony_services }}" notify: - Restart chrony container