summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/handlers/main.yml
blob: 170a3dc6ed1ec2bb5200363b2f9190d9b2eab8f7 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
- name: restart NetworkManager
  systemd:
    name: NetworkManager
    state: restarted
    enabled: True

- name: restart dnsmasq
  systemd:
    name: dnsmasq
    state: restarted

- name: restart openvswitch
  systemd:
    name: openvswitch
    state: restarted
  when:
  - (not skip_node_svc_handlers | default(False) | bool)
  - not (ovs_service_status_changed | default(false) | bool)
  - openshift_node_use_openshift_sdn | bool
  - not openshift_node_bootstrap
  register: l_openshift_node_stop_openvswitch_result
  until: not l_openshift_node_stop_openvswitch_result | failed
  retries: 3
  delay: 30
  notify:
  - restart openvswitch pause

- name: restart openvswitch pause
  pause: seconds=15
  when:
  - (not skip_node_svc_handlers | default(False) | bool)
  - openshift.common.is_containerized | bool

- name: restart node
  systemd:
    name: "{{ openshift_service_type }}-node"
    state: restarted
  register: l_openshift_node_restart_node_result
  until: not l_openshift_node_restart_node_result | failed
  retries: 3
  delay: 30
  when:
  - (not skip_node_svc_handlers | default(False) | bool)
  - not (node_service_status_changed | default(false) | bool)
  - not openshift_node_bootstrap

- name: reload systemd units
  command: systemctl daemon-reload