0
0
mirror of https://github.com/saltstack-formulas/letsencrypt-sh-formula.git synced 2024-11-27 23:07:49 +01:00
letsencrypt-sh-formula/letsencrypt-sh/map.jinja
2016-08-23 09:55:53 +02:00

33 lines
921 B
Django/Jinja

# -*- coding: utf-8 -*-
# vim: ft=jinja
{## Start with defaults from defaults.sls ##}
{% import_yaml 'letsencrypt-sh/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 os_family_map = salt['grains.filter_by']({
'Debian': {
'domains_txt': '/etc/letsencrypt.sh/domains.txt',
'config_file': '/etc/letsencrypt.sh/conf.d/defaults.sh',
},
'Suse': {},
'Arch': {},
'RedHat': {},
}
, grain="os_family"
, merge=salt['pillar.get']('letsencrypt-sh:lookup'))
%}
{## Merge the os_family_map to the default settings ##}
{% do default_settings.letsencrypt_sh.update(os_family_map) %}
{## Merge in letsencrypt-sh pillar ##}
{% set letsencrypt_sh = salt['pillar.get'](
'letsencrypt-sh',
default=default_settings.letsencrypt_sh,
merge=True
)
%}