ansible/handlers/restart_services.yml

179 lines
4.8 KiB
YAML
Raw Normal View History

########################################
# 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
- name: restart fedmsg-hub
command: /usr/local/bin/conditional-restart.sh 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
- name: restart fedmsg-relay
command: /usr/local/bin/conditional-restart.sh fedmsg-relay
2017-08-27 20:02:56 +00:00
- 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
2015-02-06 21:20:11 +00:00
- name: restart ip6tables
action: service name=ip6tables 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
2014-08-01 12:58:11 +02:00
- name: restart openvpn (RHEL6)
when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 6
2014-08-01 12:34:34 +02:00
action: service name=openvpn state=restarted
#notify:
#- fix openvpn routing
2014-08-01 12:34:34 +02:00
- 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
2014-09-23 08:55:26 +00:00
- 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
2016-09-27 03:08:25 +00:00
command: /usr/sbin/postmap /etc/postfix/tls_policy
2016-09-27 16:35:29 +00:00
- 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
2014-03-28 18:36:24 +00:00
- name: restart supervisord
service: name=supervisord state=restarted
- name: run rkhunter
command: rkhunter --propupd
2014-06-24 14:32:06 +00:00
- 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
2014-08-19 15:01:48 +00:00
- 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'
2017-01-30 22:07:38 +00:00
- name: restart pagure_ev
service: name=pagure_ev state=restarted
2015-03-11 08:54:58 +00:00
- name: "update ca-trust"
command: /usr/bin/update-ca-trust
2015-03-11 09:15:10 +00:00
2015-03-17 14:15:13 +00:00
- 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
2015-09-28 17:41:16 +00:00
- 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
2016-02-04 20:58:30 +00:00
- 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] }}
2016-02-04 22:09:06 +00:00
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
2017-07-27 15:00:24 +00:00
- name: restart buildmaster
service: name=buildmaster state=restarted