--- {%- from "apparmor/map.jinja" import apparmor with context %} {%- if apparmor.enabled is defined and apparmor.enabled %} {%- for apparmor_config in ['usr.bin.skype','opt.kingsoft','usr.bin.spotify','opt.sublime_text_3.sublime_text'] %} apparmor-{{ apparmor_config }}: file.managed: - name: "/etc/apparmor.d/{{ apparmor_config }}" - source: "salt://apparmor/{{ apparmor_config }}.j2" - user: root - group: root - mode: 0644 - template: jinja - watch_in: - service: apparmor-reload {%- endfor %} apparmor-reload: service.running: - name: apparmor - enable: true {%- endif %}