paulbsd-salt/states/apparmor/init.sls

21 lines
507 B
Plaintext
Raw Normal View History

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
- mode: 0644
- template: jinja
- watch_in:
- service: apparmor-reload
{%- endfor %}
apparmor-reload:
service.running:
- name: apparmor
- enable: true
{%- endif %}