From 75d32df1dcf17e65adf6d5738c624b62748de1d5 Mon Sep 17 00:00:00 2001 From: Qin Wang Date: Thu, 8 Sep 2016 19:01:23 +0000 Subject: [PATCH] removed redundant handler and flushed handler right away loading lxc-openstack profile into apparmor is done with service reloading, so the redundant loading handler of lxc-openstack is removed. The reloading handler is flushed right away in case of interrupted execution. Change-Id: I7a0e9d886808e0949a0e8301c6a5ea2994c6cd49 closes-bug: 1620757 --- handlers/main.yml | 7 ++----- tasks/lxc_install_apt.yml | 6 ++++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 66137392..44634f86 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -13,13 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Load lxc-openstack apparmor profile - command: apparmor_parser -Kr /etc/apparmor.d/lxc-openstack - -- name: Restart apparmor +- name: Reload apparmor service: name: "apparmor" - state: "restarted" + state: "reloaded" - name: Init reload command: "initctl reload-configuration" diff --git a/tasks/lxc_install_apt.yml b/tasks/lxc_install_apt.yml index 37741008..463d7aa4 100644 --- a/tasks/lxc_install_apt.yml +++ b/tasks/lxc_install_apt.yml @@ -64,8 +64,10 @@ group: "root" mode: "0644" notify: - - Load lxc-openstack apparmor profile - - Restart apparmor + - Reload apparmor tags: - lxc-files - lxc-apparmor + +- name: Flush handler to reload apparmor profiles + meta: flush_handlers