7281fba7ab
Ref: https://github.com/saltstack-formulas/packages-formula/pull/74 === Do not change lines below === { "chain": [], "cmd": "git ls-files -z firewalld | xargs --null -I '()' find '()' -type f -print0 | xargs --null sed --in-place --regexp-extended 's#\"firewalld/#\"./#g;s#- firewalld\\.#- .#;'", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
31 lines
804 B
Plaintext
31 lines
804 B
Plaintext
# == State: firewalld.direct
|
|
|
|
{% from "./map.jinja" import firewalld with context %}
|
|
|
|
|
|
# == Define: firewalld.direct
|
|
#
|
|
# This defines a configuration for permanent direct chains,
|
|
# rules and passtthroughs, see firewalld.direct (5) man page.
|
|
|
|
{%- if firewalld.get('direct', False) %}
|
|
/etc/firewalld/direct.xml:
|
|
file:
|
|
- managed
|
|
- name: /etc/firewalld/direct.xml
|
|
- user: root
|
|
- group: root
|
|
- mode: "0644"
|
|
- source: salt://firewalld/files/direct.xml
|
|
- template: jinja
|
|
- require:
|
|
- pkg: package_firewalld # make sure package is installed
|
|
- file: directory_firewalld
|
|
- require_in:
|
|
- service: service_firewalld
|
|
- watch_in:
|
|
- cmd: reload_firewalld # reload firewalld config
|
|
- context:
|
|
direct: {{ firewalld.direct|json }}
|
|
{%- endif %}
|