|
|
|
|
|
|
|
|
# -*- coding: utf-8 -*- |
|
|
# -*- coding: utf-8 -*- |
|
|
# vim: ft=jinja |
|
|
# vim: ft=jinja |
|
|
|
|
|
|
|
|
{## Start with defaults from defaults.yaml ##} |
|
|
|
|
|
|
|
|
{#- Start with defaults from defaults.yaml #} |
|
|
{% import_yaml "firewalld/defaults.yaml" as default_settings %} |
|
|
{% import_yaml "firewalld/defaults.yaml" as default_settings %} |
|
|
|
|
|
|
|
|
{## |
|
|
|
|
|
|
|
|
{#- |
|
|
Setup variable using grains['os_family'] based logic, only add key:values here |
|
|
Setup variable using grains['os_family'] based logic, only add key:values here |
|
|
that differ from whats in defaults.yaml |
|
|
that differ from whats in defaults.yaml |
|
|
##} |
|
|
|
|
|
|
|
|
#} |
|
|
{% set os_family_map = salt['grains.filter_by']({ |
|
|
{% set os_family_map = salt['grains.filter_by']({ |
|
|
'Debian': {}, |
|
|
'Debian': {}, |
|
|
'RedHat': {}, |
|
|
'RedHat': {}, |
|
|
'Arch': {}, |
|
|
'Arch': {}, |
|
|
'Suse': {}, |
|
|
'Suse': {}, |
|
|
}, grain='os_family', merge=salt['pillar.get']('firewalld:lookup')) |
|
|
|
|
|
|
|
|
}, grain='os_family', merge=salt['pillar.get']('firewalld:lookup')) |
|
|
%} |
|
|
%} |
|
|
|
|
|
|
|
|
{## Merge the flavor_map to the default settings ##} |
|
|
|
|
|
|
|
|
{#- Merge the flavor_map to the default settings #} |
|
|
{% do default_settings.firewalld.update(os_family_map) %} |
|
|
{% do default_settings.firewalld.update(os_family_map) %} |
|
|
|
|
|
|
|
|
{## Merge in salt:lookup pillar ##} |
|
|
|
|
|
|
|
|
{#- Merge in salt:lookup pillar #} |
|
|
{% set firewalld = salt['pillar.get']( |
|
|
{% set firewalld = salt['pillar.get']( |
|
|
'firewalld', |
|
|
'firewalld', |
|
|
default=default_settings.firewalld, |
|
|
default=default_settings.firewalld, |