diff --git a/letsencrypt/map.jinja b/letsencrypt/map.jinja index 3a88039..94bec05 100644 --- a/letsencrypt/map.jinja +++ b/letsencrypt/map.jinja @@ -4,13 +4,18 @@ {#- Start with defaults from defaults.sls #} {% import_yaml 'letsencrypt/defaults.yaml' as defaults %} {% import_yaml 'letsencrypt/osfamilymap.yaml' as osfamilymap %} +{% import_yaml 'letsencrypt/osmap.yaml' as osmap %} {% set letsencrypt = salt['grains.filter_by']( defaults, merge = salt['grains.filter_by']( osfamilymap, grain='os_family', - merge = salt['pillar.get']('letsencrypt', {}), + merge=salt['grains.filter_by']( + osmap, + grain='os', + merge = salt['pillar.get']('letsencrypt', {}), + ), ), base='letsencrypt') %} diff --git a/letsencrypt/osmap.yaml b/letsencrypt/osmap.yaml new file mode 100644 index 0000000..dedbc74 --- /dev/null +++ b/letsencrypt/osmap.yaml @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +# +# Setup variables using grains['os'] based logic. +# You just need to add the key:values for an `os` that differ +# from `defaults.yaml` + `osarch.yaml` + `os_family.yaml`. +# Only add an `os` which is/will be supported by the formula. +# +# If you do not need to provide defaults via the `os` grain, +# you will need to provide at least an empty dict in this file, e.g. +# osmap: {} +--- +# os_family: RedHat +Amazon: + pkgs: + - python2-certbot-apache