From f5d9a0e95d0896d3c03cdc78821c5b059d8f0c10 Mon Sep 17 00:00:00 2001 From: Andreas Thienemann Date: Thu, 4 Oct 2018 07:00:44 +0200 Subject: [PATCH] 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. --- postfix/map.jinja | 5 ++--- postfix/{osmap.yaml => osfamilymap.yaml} | 0 2 files changed, 2 insertions(+), 3 deletions(-) rename postfix/{osmap.yaml => osfamilymap.yaml} (100%) diff --git a/postfix/map.jinja b/postfix/map.jinja index 341d727..4d1ba96 100644 --- a/postfix/map.jinja +++ b/postfix/map.jinja @@ -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') diff --git a/postfix/osmap.yaml b/postfix/osfamilymap.yaml similarity index 100% rename from postfix/osmap.yaml rename to postfix/osfamilymap.yaml