2015-04-22 17:47:02 -05:00
|
|
|
{% import_yaml "postgres/defaults.yaml" as defaults %}
|
|
|
|
{% import_yaml "postgres/osmap.yaml" as osmap %}
|
|
|
|
{% import_yaml "postgres/codenamemap.yaml" as codemap %}
|
2014-12-31 16:58:41 -05:00
|
|
|
|
2015-04-22 17:47:02 -05:00
|
|
|
{# get the settings for the os_family grain #}
|
2016-05-23 14:51:17 -04:00
|
|
|
{% set osfam = salt['grains.filter_by'](osmap, grain='os_family') or {} %}
|
2015-04-22 17:47:02 -05:00
|
|
|
{# get the settings for the oscodename grain, os_family data will override
|
|
|
|
oscodename data #}
|
|
|
|
{% set oscode = salt['grains.filter_by'](codemap,
|
|
|
|
grain='oscodename',
|
|
|
|
merge=osfam) or {} %}
|
|
|
|
|
|
|
|
{# merge the os family/codename specific data over the defaults #}
|
|
|
|
{% do defaults.postgres.update(oscode) %}
|
|
|
|
|
|
|
|
{# merge the pillar:lookup dict into the defaults/os specific dict #}
|
|
|
|
{% set lookup = salt['pillar.get']('postgres:lookup',
|
|
|
|
default=defaults.postgres,
|
|
|
|
merge=True) %}
|
|
|
|
|
|
|
|
{# merge the actual postgres pillar into the above combined dict #}
|
|
|
|
{% set postgres = salt['pillar.get']('postgres', default=lookup, merge=True) %}
|