paulbsd-salt/states/apparmor/init.sls

22 lines
516 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:
2023-03-10 00:07:59 +01:00
- name: /etc/apparmor.d/{{ cfg }}
- source: salt://apparmor/templates/{{ cfg }}.j2
2020-07-10 00:58:55 +02:00
- user: root
- group: root
- 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
2023-03-10 00:07:59 +01:00
{%- endif %}