summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2023-02-12 17:32:07 +0100
committerGeorg Pfuetzenreuter2023-02-12 17:35:09 +0100
commit75f105a6aaa6354c34772a5aa63ee0b741eb61b2 (patch)
treeac72eca4f520b87b6e946b1b065ac8974f497b9e
parent0a00f3ea9367386847162a10d7548b2d0433ce93 (diff)
downloadsalt-75f105a6aaa6354c34772a5aa63ee0b741eb61b2.tar.gz
salt-75f105a6aaa6354c34772a5aa63ee0b741eb61b2.tar.bz2
salt-75f105a6aaa6354c34772a5aa63ee0b741eb61b2.zip
AppArmor: reload on drop-in changes
Self-explanatory. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
-rw-r--r--salt/profile/apparmor/local.sls13
1 files changed, 13 insertions, 0 deletions
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 %}