From acf5832f680b542396e29da89f243b53ffd405bc Mon Sep 17 00:00:00 2001 From: Niels Abspoel Date: Sun, 11 Jan 2015 12:21:42 +0100 Subject: [PATCH] fix #84 with same logic as dnsmasq-formula --- salt/map.jinja | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/salt/map.jinja b/salt/map.jinja index e342330..eac6f48 100644 --- a/salt/map.jinja +++ b/salt/map.jinja @@ -1,4 +1,4 @@ -{% set pkgs = salt['grains.filter_by']({ +{% set map = { 'Debian': {'salt-master': 'salt-master', 'salt-minion': 'salt-minion', 'salt-syndic': 'salt-syndic', @@ -49,5 +49,10 @@ 'minion-service': 'salt_minion', 'master-service': 'salt_master', 'syndic-service': 'salt_syndic'}, -}, -merge=salt['pillar.get']('salt:lookup'), base='default') %} +} %} + +{% if grains.get('saltversion', '').startswith('0.17') %} +{% set salt= salt['grains.filter_by'](map, merge=salt['pillar.get']('salt:lookup'), base='default') %} +{% else %} +{% set salt = map.get(grains.os_family) %} +{% endif %}