summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-etcd/restart.yml
blob: 5eaea5ae8e19e0595783c6f3fe09fb25a102b541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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