summaryrefslogtreecommitdiffstats
path: root/salt/profile/apparmor/local.sls
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2023-02-12 16:20:44 +0100
committerGeorg Pfuetzenreuter2023-02-12 16:20:44 +0100
commit0eca62f4ce29c4b986b24b4d5e0bc7980cdc6784 (patch)
treee9cd56d8c9bd494b4b167f6bc82c9c37bb4ab430 /salt/profile/apparmor/local.sls
parent91089d5d98d1a8833698d719beb7211988a52cb2 (diff)
downloadsalt-0eca62f4ce29c4b986b24b4d5e0bc7980cdc6784.tar.gz
salt-0eca62f4ce29c4b986b24b4d5e0bc7980cdc6784.tar.bz2
salt-0eca62f4ce29c4b986b24b4d5e0bc7980cdc6784.zip
Add AppArmor profile
Simple profile to allow for management of local profile drop-ins using pillar values. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'salt/profile/apparmor/local.sls')
-rw-r--r--salt/profile/apparmor/local.sls9
1 files changed, 9 insertions, 0 deletions
diff --git a/salt/profile/apparmor/local.sls b/salt/profile/apparmor/local.sls
new file mode 100644
index 0000000..6dbdff3
--- /dev/null
+++ b/salt/profile/apparmor/local.sls
@@ -0,0 +1,9 @@
+{%- set aapillar = salt['pillar.get']('profile:apparmor') %}
+
+{%- if 'local' in aapillar %}
+{%- for profile, lines in aapillar['local'].items() %}
+/etc/apparmor.d/local/{{ profile }}:
+ file.managed:
+ - contents: {{ lines }}
+{%- endfor %}
+{%- endif %}