From 79939ca092b9ee0fe31e5964102c60fca73da568 Mon Sep 17 00:00:00 2001 From: Russell Teague Date: Thu, 16 Nov 2017 11:31:29 -0500 Subject: Playbook Consolidation - openshift-etcd --- playbooks/openshift-etcd/private/restart.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 playbooks/openshift-etcd/private/restart.yml (limited to 'playbooks/openshift-etcd/private/restart.yml') diff --git a/playbooks/openshift-etcd/private/restart.yml b/playbooks/openshift-etcd/private/restart.yml new file mode 100644 index 000000000..5eaea5ae8 --- /dev/null +++ b/playbooks/openshift-etcd/private/restart.yml @@ -0,0 +1,27 @@ +--- +- name: Restart etcd + hosts: oo_etcd_to_config + serial: 1 + tasks: + - name: restart etcd + 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