letsencrypt-sh-formula/letsencrypt-sh/map.jinja

33 lines
921 B
Plaintext
Raw Permalink Normal View History

2016-06-21 00:59:06 +02:00
# -*- 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']({
2016-08-23 09:55:53 +02:00
'Debian': {
'domains_txt': '/etc/letsencrypt.sh/domains.txt',
'config_file': '/etc/letsencrypt.sh/conf.d/defaults.sh',
},
2016-06-21 00:59:06 +02:00
'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
)
%}