summaryrefslogtreecommitdiffstats
path: root/salt
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2023-02-12 17:37:56 +0100
committerGeorg Pfuetzenreuter2023-02-12 17:37:56 +0100
commit29435f6fc3200a2ccb0a4cc274485f8fd0906012 (patch)
treeac72eca4f520b87b6e946b1b065ac8974f497b9e /salt
parent0a00f3ea9367386847162a10d7548b2d0433ce93 (diff)
parent75f105a6aaa6354c34772a5aa63ee0b741eb61b2 (diff)
downloadsalt-29435f6fc3200a2ccb0a4cc274485f8fd0906012.tar.gz
salt-29435f6fc3200a2ccb0a4cc274485f8fd0906012.tar.bz2
salt-29435f6fc3200a2ccb0a4cc274485f8fd0906012.zip
Merge pull request 'AppArmor: reload on drop-in changes' (#28) from reload-apparmor into production
Reviewed-on: https://git.com.de/LibertaCasa/salt/pulls/28
Diffstat (limited to 'salt')
-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 %}