Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use relative state include #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion firewalld/backend.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This state ensures that /etc/firewalld/backends/ exists.
#
{% from "firewalld/map.jinja" import firewalld with context %}
{% from "./map.jinja" import firewalld with context %}

{% set backend_manage = firewalld.backend.manage %}
{% set backend_pkg = firewalld.backend.pkg %}
Expand Down
2 changes: 1 addition & 1 deletion firewalld/config.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This state configures firewalld.
#
{% from "firewalld/map.jinja" import firewalld with context %}
{% from "./map.jinja" import firewalld with context %}

directory_firewalld:
file.directory: # make sure this is a directory
Expand Down
2 changes: 1 addition & 1 deletion firewalld/debian10.sls
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "firewalld/map.jinja" import firewalld with context %}
{% from "./map.jinja" import firewalld with context %}

firewalld_repo_buster-backports:
pkgrepo.managed:
Expand Down
2 changes: 1 addition & 1 deletion firewalld/direct.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# == State: firewalld.direct

{% from "firewalld/map.jinja" import firewalld with context %}
{% from "./map.jinja" import firewalld with context %}


# == Define: firewalld.direct
Expand Down
16 changes: 8 additions & 8 deletions firewalld/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This state installs/runs firewalld.
#
{% from "firewalld/map.jinja" import firewalld with context %}
{% from "./map.jinja" import firewalld with context %}

{% if salt['grains.get']('osfullname') == "SLES" and salt['grains.get']('osmajorrelease')|int < 15 %}

Expand All @@ -17,14 +17,14 @@ firewalld-unsupported:

include:
{% if grains.get('osfinger', '') == 'Debian-10' %}
- firewalld.debian10
- .debian10
{% endif %}
- firewalld.config
- firewalld.ipsets
- firewalld.backend
- firewalld.services
- firewalld.zones
- firewalld.direct
- .config
- .ipsets
- .backend
- .services
- .zones
- .direct

# iptables service that comes with rhel/centos
iptables:
Expand Down
2 changes: 1 addition & 1 deletion firewalld/ipsets.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This state ensures that /etc/firewalld/ipsets/ exists.
#
{% from "firewalld/map.jinja" import firewalld with context %}
{% from "./map.jinja" import firewalld with context %}

# Backward compatibility setting and deprecation notices
{% set ipset_manage = false %}
Expand Down
10 changes: 5 additions & 5 deletions firewalld/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# vim: ft=jinja

{#- Start with defaults from defaults.yaml #}
{% import_yaml "firewalld/defaults.yaml" as default_settings %}
{% import_yaml "firewalld/osarchmap.yaml" as osarchmap %}
{% import_yaml "firewalld/osfamilymap.yaml" as osfamilymap %}
{% import_yaml "firewalld/osmap.yaml" as osmap %}
{% import_yaml "firewalld/osfingermap.yaml" as osfingermap %}
{% import_yaml "./defaults.yaml" as default_settings %}
{% import_yaml "./osarchmap.yaml" as osarchmap %}
{% import_yaml "./osfamilymap.yaml" as osfamilymap %}
{% import_yaml "./osmap.yaml" as osmap %}
{% import_yaml "./osfingermap.yaml" as osfingermap %}

{% set _config = salt['config.get']('firewalld', default={}) %}

Expand Down
2 changes: 1 addition & 1 deletion firewalld/services.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This state ensures that /etc/firewalld/services/ exists.
#
{% from "firewalld/map.jinja" import firewalld with context %}
{% from "./map.jinja" import firewalld with context %}

directory_firewalld_services:
file.directory: # make sure this is a directory
Expand Down
2 changes: 1 addition & 1 deletion firewalld/zones.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This state ensures that /etc/firewalld/zones/ exists.
#
{% from "firewalld/map.jinja" import firewalld with context %}
{% from "./map.jinja" import firewalld with context %}

directory_firewalld_zones:
file.directory: # make sure this is a directory
Expand Down