diff --git a/salt/profile/apparmor/local.sls b/salt/profile/apparmor/local.sls index 6dbdff3..4678ec4 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 + {%- for profile in aapillar['local'] %} + - onchanges: + - file: /etc/apparmor.d/local/{{ profile }} + {%- endfor %} +{%- endif %} {%- endif %}