diff options
author | Georg Pfuetzenreuter | 2023-02-12 17:32:07 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2023-02-12 17:35:09 +0100 |
commit | 75f105a6aaa6354c34772a5aa63ee0b741eb61b2 (patch) | |
tree | ac72eca4f520b87b6e946b1b065ac8974f497b9e | |
parent | 0a00f3ea9367386847162a10d7548b2d0433ce93 (diff) | |
download | salt-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.sls | 13 |
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 %} |