2017-05-16 16:26:23 -04:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=jinja
|
|
|
|
|
|
|
|
{## Start with defaults from defaults.sls ##}
|
|
|
|
{% import_yaml 'sssd/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': {
|
2017-05-16 16:30:06 -04:00
|
|
|
'package_extras': ['libpam-runtime', 'libpam-sss', 'libnss-sss'],
|
2017-05-16 16:26:23 -04:00
|
|
|
},
|
|
|
|
'FreeBSD': {
|
2017-05-16 16:30:06 -04:00
|
|
|
'package_extras': False,
|
2017-05-16 16:26:23 -04:00
|
|
|
},
|
|
|
|
'RedHat': {
|
2017-05-16 16:30:06 -04:00
|
|
|
'package_extras': ['authconfig'],
|
2017-05-16 16:26:23 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
grain='os_family',
|
|
|
|
merge=salt['pillar.get']('sssd:lookup')
|
|
|
|
) %}
|
|
|
|
|
|
|
|
{## Merge the flavor_map over the default settings ##}
|
|
|
|
{% do default_settings.sssd.update(flavor_map) %}
|
|
|
|
|
|
|
|
{## Merge in changes from the sssd:lookup pillar ##}
|
|
|
|
{% set sssd_settings = salt['pillar.get'](
|
|
|
|
'sssd',
|
|
|
|
default=default_settings.sssd,
|
|
|
|
merge=True
|
|
|
|
) %}
|