All checks were successful
ci/lysergic/push/pipeline Pipeline was successful
Self-explanatory. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
23 lines
568 B
Django/Jinja
23 lines
568 B
Django/Jinja
{%- 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 }}
|
|
- 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 %}
|