summaryrefslogtreecommitdiffstats
path: root/handlers/restart_services.yml
blob: 93e20433dde608b30e189cbb1c3f84a7b247502c (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
########################################
# Handlers for restarting services
#

- name: restart apache
  command: /usr/local/bin/conditional-restart.sh httpd httpd

- name: reload apache
  action: service name=httpd state=reloaded

- name: restart collectd
  action: service name=collectd state=restarted

- name: restart crond
  action: service name=crond state=restarted

- name: restart fedmsg-gateway
  command: /usr/local/bin/conditional-restart.sh fedmsg-gateway fedmsg-gateway

- name: restart fedmsg-hub
  command: /usr/local/bin/conditional-restart.sh fedmsg-hub fedmsg-hub
  # Note that, we're cool with arbitrary restarts on bodhi-backend02, just
  # not bodhi-backend01 or bodhi-backend03.  01 and 03 is where the releng/mash 
  # stuff happens and we # don't want to interrupt that.
  when: inventory_hostname not in ['bodhi-backend01.phx2.fedoraproject.org', 'bodhi-backend03.phx2.fedoraproject.org']

- name: restart fedmsg-irc
  command: /usr/local/bin/conditional-restart.sh fedmsg-irc fedmsg-irc

- name: restart fedmsg-relay
  command: /usr/local/bin/conditional-restart.sh fedmsg-relay fedmsg-relay

- name: restart koji-sync-listener
  action: service name=koji-sync-listener state=restarted

- name: reload httpd
  command: /usr/local/bin/conditional-reload.sh httpd httpd

- name: restart iptables
  action: service name=iptables state=restarted

- name: restart ip6tables
  action: service name=ip6tables state=restarted

- name: restart jenkins
  action: service name=jenkins state=restarted

- name: restart libvirtd
  action: service name=libvirtd state=restarted

- name: restart mailman
  action: service name=mailman state=restarted

- name: restart named
  action: service name=named state=restarted

- name: restart ntpd
  action: service name=ntpd state=restarted

- name: restart openvpn (Fedora)
  when: ansible_distribution == "Fedora"
  action: service name=openvpn-client@openvpn state=restarted
  #notify:
  #- fix openvpn routing

- name: restart openvpn (RHEL6)
  when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 6
  action: service name=openvpn state=restarted
  #notify:
  #- fix openvpn routing

- name: restart openvpn (RHEL7)
  when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 7
  action: service name=openvpn-client@openvpn state=restarted
  #notify:
  #- fix openvpn routing

- name: fix openvpn routing
  action: shell /etc/openvpn/fix-routes.sh

- name: restart xinetd
  action: service name=xinetd state=restarted

- name: restart netapproute
  action: command /etc/sysconfig/network-scripts/ifup-routes eth1

- name: restart network
  action: service name=network state=restarted

- name: rebuild postfix transport
  command: /usr/sbin/postmap /etc/postfix/transport

- name: rebuild postfix tls_policy
  command: /usr/sbin/postmap /etc/postfix/tls_policy

- name: restart postfix
  service: name=postfix state=restarted

- name: reload proxyhttpd
  command: /usr/local/bin/proxy-conditional-reload.sh httpd httpd

- name: restart glusterd
  service: name=glusterd state=restarted

- name: restart supervisord
  service: name=supervisord state=restarted

- name: run rkhunter
  command: rkhunter --propupd

- name: restart moksha-hub
  service: name=moksha-hub state=restarted

- name: restart dhcpd
  service: name=dhcpd state=restarted

- name: restart memcached
  service: name=memcached state=restarted

- name: reload systemd
  command: systemctl daemon-reload

- name: restart nagios
  shell: nagios -v /etc/nagios/nagios.cfg && systemctl restart nagios

- name: restart bridge
  shell: /usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/bridge

- name: reload libvirtd
  service: name=libvirtd state=reloaded
  ignore_errors: true
  when: ansible_virtualization_role == 'host'

- name: restart pagure_ev
  service: name=pagure_ev state=restarted

- name: "update ca-trust"
  command: /usr/bin/update-ca-trust

- name: restart stunnel
  service: name=stunnel state=restarted

- name: restart cinder api
  service: name=openstack-cinder-api state=restarted

- name: restart cinder scheduler
  service: name=openstack-cinder-scheduler state=restarted

- name: restart cinder volume
  service: name=openstack-cinder-volume state=restarted

- name: restart autocloud
  service: name=autocloud state=restarted

- name: restart mirrorlist-server
  service: name=mirrorlist-server state=restarted

- name: restart NetworkManager
  service: name=NetworkManager state=restarted

- name: reload NetworkManager-connections
  command: nmcli c reload

- name: restart basset-worker
  service: name=basset-worker state=restarted

- name: apply interface-changes
  command: nmcli con up {{ item.split()[1] }}
  async: 1
  poll: 0
  with_items:
  - "{{ if_uuid.stdout_lines }}"

- name: flush journald tmpfiles to persistent store
  command: pkill -f -USR1 systemd-journald

- name: restart idmapd
  service: name=nfs-idmapd state=restarted

- name: restart darkserver
  service: name=darkserver state=restarted