From 75f105a6aaa6354c34772a5aa63ee0b741eb61b2 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 12 Feb 2023 17:32:07 +0100 Subject: AppArmor: reload on drop-in changes Self-explanatory. Signed-off-by: Georg Pfuetzenreuter --- salt/profile/apparmor/local.sls | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'salt/profile') diff --git a/salt/profile/apparmor/local.sls b/salt/profile/apparmor/local.sls index 6dbdff3..3ae5d1f 100644 --- a/salt/profile/apparmor/local.sls +++ b/salt/profile/apparmor/local.sls @@ -5,5 +5,18 @@ /etc/apparmor.d/local/{{ profile }}: file.managed: - contents: {{ lines }} + - watch_in: + - module: apparmor_reload {%- endfor %} + +{%- if aapillar['local'] | length %} +apparmor_reload: + module.run: + - name: service.reload + - m_name: apparmor + - onchanges: + {%- for profile in aapillar['local'] %} + - file: /etc/apparmor.d/local/{{ profile }} + {%- endfor %} +{%- endif %} {%- endif %} -- cgit v1.2.3