summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-master/restart_services.yml
blob: a5ab62dc54bd1ba460e63e4714895d81f02e7f3a (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 master
  service:
    name: "{{ openshift.common.service_type }}-master"
    state: restarted
  when: not openshift_master_ha | bool
- name: Restart master API
  service:
    name: "{{ openshift.common.service_type }}-master-api"
    state: restarted
  when: openshift_master_ha | bool and openshift.master.cluster_method != 'pacemaker'
- name: Wait for master API to come back online
  become: no
  local_action:
    module: wait_for
      host="{{ openshift.common.hostname }}"
      state=started
      delay=10
      port="{{ openshift.master.api_port }}"
  when: openshift_master_ha | bool and openshift.master.cluster_method != 'pacemaker'
- name: Restart master controllers
  service:
    name: "{{ openshift.common.service_type }}-master-controllers"
    state: restarted
  # Ignore errrors since it is possible that type != simple for
  # pre-3.1.1 installations.
  ignore_errors: true
  when: openshift_master_ha | bool and openshift.master.cluster_method != 'pacemaker'