2
0

Removed package_map lookup

Added map.jinja solution more in line with other formulas,
This also improves issue #30

and pull request #30
This commit is contained in:
Niels Abspoel 2014-12-31 11:52:31 +01:00
parent e8e01e34d9
commit 896578a75a
7 changed files with 59 additions and 6 deletions

View File

@ -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', {}) -%}

53
salt/map.jinja Normal file
View File

@ -0,0 +1,53 @@
{% set pkgs = salt['grains.filter_by']({
'Debian': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-ssh': 'salt-ssh'},
'Ubuntu': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-ssh': 'salt-ssh'},
'CentOS': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-ssh': 'salt-ssh'},
'Amazon': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-ssh': 'salt-ssh'},
'Fedora': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-ssh': 'salt-ssh'},
'RedHat': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-ssh': 'salt-ssh'},
'Gentoo': {'salt-master': 'app-admin/salt',
'salt-minion': 'app-admin/salt',
'salt-syndic': 'app-admin/salt',
'salt-cloud': 'app-admin/salt'},
'Arch': {'salt-master': 'salt',
'salt-minion': 'salt',
'salt-syndic': 'salt',
'salt-cloud': 'salt'},
'openSUSE':{'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud'},
'FreeBSD': {'salt-master': 'py27-salt',
'salt-minion': 'py27-salt',
'salt-syndic': 'py27-salt',
'salt-cloud': 'py27-salt',
'config-path': '/usr/local/etc/salt',
'minion-service': 'salt_minion',
'master-service': 'salt_master',
'syndic-service': 'salt_syndic'},
},
merge=salt['pillar.get']('salt:lookup'), base='default') %}

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -1,4 +1,4 @@
{% from "salt/package-map.jinja" import pkgs with context %}
{% from "salt/map.jinja" import pkgs with context %}
include:
- salt.master