summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-etcd
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2017-09-21 15:18:08 -0400
committerAndrew Butcher <abutcher@redhat.com>2017-09-21 15:37:12 -0400
commit775128cc52d8295fe4cf08211ab53730d101692c (patch)
treeec67eba9059a99fb59573cbe60c6c70fee3c7ca4 /playbooks/common/openshift-etcd
parent4ba216918e27d2e075b237e3151630d55d1a563d (diff)
downloadopenshift-775128cc52d8295fe4cf08211ab53730d101692c.tar.gz
openshift-775128cc52d8295fe4cf08211ab53730d101692c.tar.bz2
openshift-775128cc52d8295fe4cf08211ab53730d101692c.tar.xz
openshift-775128cc52d8295fe4cf08211ab53730d101692c.zip
Do a full stop/start when etcd certificates had expired.
Diffstat (limited to 'playbooks/common/openshift-etcd')
-rw-r--r--playbooks/common/openshift-etcd/restart.yml18
1 files changed, 18 insertions, 0 deletions
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