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:
parent
e8e01e34d9
commit
896578a75a
@ -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
53
salt/map.jinja
Normal 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') %}
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% from "salt/package-map.jinja" import pkgs with context %}
|
||||
{% from "salt/map.jinja" import pkgs with context %}
|
||||
|
||||
include:
|
||||
- salt.master
|
||||
|
Loading…
Reference in New Issue
Block a user