30 lines
722 B
Django/Jinja
30 lines
722 B
Django/Jinja
# -*- coding: utf-8 -*-
|
|
# vim: ft=jinja ts=2 sw=2 expandtab
|
|
|
|
{## Start with defaults from defaults.sls ##}
|
|
{% import_yaml 'system/defaults.yaml' as default_settings %}
|
|
|
|
{##
|
|
Setup variable using grains['os_family'] based logic, only add key:values here
|
|
that differ from whats in defaults.yaml
|
|
##}
|
|
{% set flavor_map = salt['grains.filter_by'](
|
|
{
|
|
'Debian': {},
|
|
'FreeBSD': {},
|
|
'RedHat': {}
|
|
},
|
|
grain='os_family',
|
|
merge=salt['pillar.get']('system')
|
|
) %}
|
|
|
|
{## Merge the flavor_map over the default settings ##}
|
|
{% do default_settings.update(flavor_map) %}
|
|
|
|
{## Merge in changes from the system pillar ##}
|
|
{% set system_settings = salt['pillar.get'](
|
|
'system',
|
|
default=default_settings,
|
|
merge=True
|
|
) %}
|