diff --git a/salt/cloud.sls b/salt/cloud.sls index 41c753bfe..be62f5d5b 100644 --- a/salt/cloud.sls +++ b/salt/cloud.sls @@ -1,4 +1,4 @@ -{% from "salt/package-map.jinja" import pkgs with context %} +{% from "salt/map.jinja" import pkgs with context %} {% set salt = pillar.get('salt', {}) -%} {% set cloud = salt.get('cloud', {}) -%} diff --git a/salt/package-map.jinja b/salt/map.jinja similarity index 89% rename from salt/package-map.jinja rename to salt/map.jinja index 770de38a0..e342330a0 100644 --- a/salt/package-map.jinja +++ b/salt/map.jinja @@ -1,4 +1,4 @@ -{% set package_table = { +{% set pkgs = salt['grains.filter_by']({ 'Debian': {'salt-master': 'salt-master', 'salt-minion': 'salt-minion', 'salt-syndic': 'salt-syndic', @@ -48,11 +48,6 @@ 'config-path': '/usr/local/etc/salt', 'minion-service': 'salt_minion', 'master-service': 'salt_master', - 'syndic-service': 'salt_syndic'} -} %} - -{% if 'package_table' in pillar %} - {% set pkgs = pillar['package_table'] %} -{% elif grains['os'] in package_table %} - {% set pkgs = package_table[grains['os']] %} -{% endif %} + 'syndic-service': 'salt_syndic'}, +}, +merge=salt['pillar.get']('salt:lookup'), base='default') %} diff --git a/salt/master.sls b/salt/master.sls index baa2e2b28..2cb3bd040 100644 --- a/salt/master.sls +++ b/salt/master.sls @@ -1,4 +1,4 @@ -{% from "salt/package-map.jinja" import pkgs with context %} +{% from "salt/map.jinja" import pkgs with context %} salt-master: pkg.installed: diff --git a/salt/minion.sls b/salt/minion.sls index a80e210ac..a33172fe7 100644 --- a/salt/minion.sls +++ b/salt/minion.sls @@ -1,4 +1,4 @@ -{% from "salt/package-map.jinja" import pkgs with context %} +{% from "salt/map.jinja" import pkgs with context %} salt-minion: pkg.installed: diff --git a/salt/ssh.sls b/salt/ssh.sls index 2f6aecea9..e32f5ebb2 100644 --- a/salt/ssh.sls +++ b/salt/ssh.sls @@ -1,4 +1,4 @@ -{% from "salt/package-map.jinja" import pkgs with context %} +{% from "salt/map.jinja" import pkgs with context %} ensure salt-ssh is installed: pkg.installed: diff --git a/salt/standalone.sls b/salt/standalone.sls index e33da85ea..e4a8cd24f 100644 --- a/salt/standalone.sls +++ b/salt/standalone.sls @@ -1,4 +1,4 @@ -{% from "salt/package-map.jinja" import pkgs with context %} +{% from "salt/map.jinja" import pkgs with context %} salt-minion: pkg.installed: diff --git a/salt/syndic.sls b/salt/syndic.sls index 0804d981d..5af99e40b 100644 --- a/salt/syndic.sls +++ b/salt/syndic.sls @@ -1,4 +1,4 @@ -{% from "salt/package-map.jinja" import pkgs with context %} +{% from "salt/map.jinja" import pkgs with context %} include: - salt.master