Rework of PR #69 to fix Issue #68

Issue #68 raised a valid problem: The postfix formula is using
the osmap.yaml file incorrectly. It is being used to filter on
the os grain but should instead be filtering on os_family
to correctly account for Red Hat/CentOS similarities.

PR #69 did the fix in a complex way as it only moved parts of the os
mapping into the os_family mapping.

This is a much simpler fix, as it just renames the file and uses
it as a os_family map, which it actually is.

If we really need to differentiate between os flavors inside the
os_family at a later date, we can then add a lookup on the os grain.
No need to complicate manners now.
This commit is contained in:
Andreas Thienemann 2018-10-04 07:00:44 +02:00 committed by Andreas Thienemann
parent ca6b26e3ed
commit f5d9a0e95d
2 changed files with 2 additions and 3 deletions

View File

@ -2,13 +2,12 @@
# vim: ft=jinja
{% import_yaml "postfix/defaults.yaml" as defaults %}
{% import_yaml "postfix/osmap.yaml" as osmap %}
{% import_yaml "postfix/osfamilymap.yaml" as os_familymap %}
{% set postfix = salt['grains.filter_by'](
defaults,
merge=salt['grains.filter_by'](
osmap,
grain='os',
os_familymap,
merge=salt['pillar.get']('postfix:lookup', {}),
),
base='postfix')