36 lines
878 B
Django/Jinja
36 lines
878 B
Django/Jinja
# -*- coding: utf-8 -*-
|
|
# vim: ft=jinja
|
|
|
|
{## Start with defaults from defaults.sls ##}
|
|
{% import_yaml 'nslcd/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': {
|
|
'package_name': False,
|
|
'conf_path': '/usr/local/etc/nslcd.conf',
|
|
'conf_group': 'wheel',
|
|
},
|
|
'RedHat': {
|
|
'package_name': 'nss-pam-ldapd',
|
|
}
|
|
},
|
|
grain='os_family',
|
|
merge=salt['pillar.get']('nslcd:lookup')
|
|
) %}
|
|
|
|
{## Merge the flavor_map over the default settings ##}
|
|
{% do default_settings.nslcd.update(flavor_map) %}
|
|
|
|
{## Merge in changes from the nslcd:lookup pillar ##}
|
|
{% set nslcd_settings = salt['pillar.get'](
|
|
'nslcd',
|
|
default=default_settings.nslcd,
|
|
merge=True
|
|
) %}
|