From 775128cc52d8295fe4cf08211ab53730d101692c Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Thu, 21 Sep 2017 15:18:08 -0400 Subject: Do a full stop/start when etcd certificates had expired. --- playbooks/common/openshift-etcd/restart.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'playbooks/common/openshift-etcd') diff --git a/playbooks/common/openshift-etcd/restart.yml b/playbooks/common/openshift-etcd/restart.yml index af1ef245a..5eaea5ae8 100644 --- a/playbooks/common/openshift-etcd/restart.yml +++ b/playbooks/common/openshift-etcd/restart.yml @@ -7,3 +7,21 @@ service: name: "{{ 'etcd_container' if openshift.common.etcd_runtime == 'docker' else 'etcd' }}" state: restarted + when: + - not g_etcd_certificates_expired | default(false) | bool + +- name: Restart etcd + hosts: oo_etcd_to_config + tasks: + - name: stop etcd + service: + name: "{{ 'etcd_container' if openshift.common.etcd_runtime == 'docker' else 'etcd' }}" + state: stopped + when: + - g_etcd_certificates_expired | default(false) | bool + - name: start etcd + service: + name: "{{ 'etcd_container' if openshift.common.etcd_runtime == 'docker' else 'etcd' }}" + state: started + when: + - g_etcd_certificates_expired | default(false) | bool -- cgit v1.2.3