2016-01-19 22:15:08 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=jinja
|
|
|
|
|
2019-11-09 08:05:11 +01:00
|
|
|
{#- Start with defaults from defaults.yaml #}
|
2016-01-19 22:15:08 +01:00
|
|
|
{% import_yaml "firewalld/defaults.yaml" as default_settings %}
|
|
|
|
|
2019-11-09 08:05:11 +01:00
|
|
|
{#-
|
2016-01-19 22:15:08 +01:00
|
|
|
Setup variable using grains['os_family'] based logic, only add key:values here
|
|
|
|
that differ from whats in defaults.yaml
|
2019-11-09 08:05:11 +01:00
|
|
|
#}
|
2016-01-19 22:15:08 +01:00
|
|
|
{% set os_family_map = salt['grains.filter_by']({
|
|
|
|
'Debian': {},
|
|
|
|
'RedHat': {},
|
|
|
|
'Arch': {},
|
2017-05-25 22:41:40 +02:00
|
|
|
'Suse': {},
|
2019-11-09 08:05:11 +01:00
|
|
|
}, grain='os_family', merge=salt['pillar.get']('firewalld:lookup'))
|
2016-01-19 22:15:08 +01:00
|
|
|
%}
|
|
|
|
|
2019-11-09 08:05:11 +01:00
|
|
|
{#- Merge the flavor_map to the default settings #}
|
2016-01-19 22:15:08 +01:00
|
|
|
{% do default_settings.firewalld.update(os_family_map) %}
|
|
|
|
|
2019-11-09 08:05:11 +01:00
|
|
|
{#- Merge in salt:lookup pillar #}
|
2016-01-19 22:15:08 +01:00
|
|
|
{% set firewalld = salt['pillar.get'](
|
|
|
|
'firewalld',
|
|
|
|
default=default_settings.firewalld,
|
|
|
|
merge=True)
|
|
|
|
%}
|