|
-
-
-
-
- {% from "firewalld/map.jinja" import firewalld with context %}
-
- directory_firewalld_services:
- file.directory:
- - name: /etc/firewalld/services
- - user: root
- - group: root
- - mode: 750
- - require:
- - pkg: package_firewalld
- - require_in:
- - service: service_firewalld
- - watch_in:
- - cmd: reload_firewalld
-
-
-
-
-
-
-
- {% for k, v in salt['pillar.get']('firewalld:services', {}).items() %}
- {% set s_name = v.name|default(k) %}
-
- /etc/firewalld/services/{{ s_name }}.xml:
- file:
- - managed
- - name: /etc/firewalld/services/{{ s_name }}.xml
- - user: root
- - group: root
- - mode: 644
- - source: salt://firewalld/files/service.xml
- - template: jinja
- - require:
- - pkg: package_firewalld
- - file: directory_firewalld_services
- - require_in:
- - service: service_firewalld
- - watch_in:
- - cmd: reload_firewalld
- - context:
- name: {{ s_name }}
- service: {{ v|json }}
-
- {% endfor %}
|