2020-07-10 00:58:55 +02:00
|
|
|
---
|
|
|
|
{%- from "apparmor/map.jinja" import apparmor with context %}
|
|
|
|
{%- if apparmor.enabled is defined and apparmor.enabled %}
|
2021-09-25 16:03:23 +02:00
|
|
|
{%- for cfg in apparmor.configs %}
|
|
|
|
apparmor-{{ cfg }}:
|
2020-07-10 00:58:55 +02:00
|
|
|
file.managed:
|
2021-09-25 16:03:23 +02:00
|
|
|
- name: "/etc/apparmor.d/{{ cfg }}"
|
|
|
|
- source: "salt://apparmor/{{ cfg }}.j2"
|
2020-07-10 00:58:55 +02:00
|
|
|
- user: root
|
|
|
|
- group: root
|
2022-06-10 00:13:19 +02:00
|
|
|
- mode: "0644"
|
2020-07-10 00:58:55 +02:00
|
|
|
- template: jinja
|
|
|
|
- watch_in:
|
|
|
|
- service: apparmor-reload
|
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
apparmor-reload:
|
|
|
|
service.running:
|
|
|
|
- name: apparmor
|
|
|
|
- enable: true
|
|
|
|
{%- endif %}
|