From a136816e8372b22ec950fa7b5486fccbcf83ddeb Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 28 Apr 2015 17:18:14 +0000 Subject: [PATCH] Rework the iptables/libvirt handler stuff. --- handlers/restart_services.yml | 6 +++--- roles/base/tasks/main.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/handlers/restart_services.yml b/handlers/restart_services.yml index 1d2e964cd7..b4371e92c2 100644 --- a/handlers/restart_services.yml +++ b/handlers/restart_services.yml @@ -149,10 +149,10 @@ - name: restart bridge shell: /usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/bridge -- name: hup libvirtd - command: pkill -HUP libvirtd +- name: reload libvirtd + service: name=libvirtd state=reloaded ignore_errors: true - when: inventory_hostname.startswith('buildhw') + when: ansible_virtualization_role == 'host' - name: restart fcomm-cache-worker service: name=fcomm-cache-worker state=restarted diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index 744ab539ce..669d028abe 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -117,7 +117,7 @@ when: not inventory_hostname.startswith('fed-cloud09') notify: - restart iptables - - hup libvirtd + - reload libvirtd tags: - iptables - config @@ -141,7 +141,7 @@ when: not inventory_hostname.startswith('fed-cloud09') notify: - restart ip6tables - - hup libvirtd + - reload libvirtd tags: - ip6tables - config