nsswitch-formula/nsswitch/map.jinja

37 lines
917 B
Plaintext
Raw Normal View History

2017-05-23 15:17:51 -04:00
# -*- coding: utf-8 -*-
# vim: ft=jinja
{## Start with defaults from defaults.sls ##}
{% import_yaml 'nsswitch/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'](
{
2017-05-23 15:24:18 -04:00
'Debian': {
'config_path': '/etc/nsswitch.conf',
},
2017-05-23 15:22:10 -04:00
'FreeBSD': {
2017-10-30 13:23:59 -04:00
'package_name': 'nss',
'config_path': '/etc/nsswitch.conf',
2017-05-23 15:22:10 -04:00
},
2017-05-23 15:24:18 -04:00
'RedHat': {
'config_path': '/etc/nsswitch.conf',
}
2017-05-23 15:17:51 -04:00
},
grain='os_family',
merge=salt['pillar.get']('nsswitch:lookup')
) %}
{## Merge the flavor_map over the default settings ##}
{% do default_settings.nsswitch.update(flavor_map) %}
{## Merge in changes from the nsswitch:lookup pillar ##}
{% set nsswitch_settings = salt['pillar.get'](
'nsswitch',
default=default_settings.nsswitch,
merge=True
) %}