Browse Source

Removed package_map lookup

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

and pull request #30
master
Niels Abspoel 10 years ago
parent
commit
896578a75a
7 changed files with 59 additions and 6 deletions
  1. +1
    -1
      salt/cloud.sls
  2. +53
    -0
      salt/map.jinja
  3. +1
    -1
      salt/master.sls
  4. +1
    -1
      salt/minion.sls
  5. +1
    -1
      salt/ssh.sls
  6. +1
    -1
      salt/standalone.sls
  7. +1
    -1
      salt/syndic.sls

+ 1
- 1
salt/cloud.sls 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
- 0
salt/map.jinja 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') %}

+ 1
- 1
salt/master.sls 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:

+ 1
- 1
salt/minion.sls 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:

+ 1
- 1
salt/ssh.sls 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:

+ 1
- 1
salt/standalone.sls 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:

+ 1
- 1
salt/syndic.sls 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

Loading…
Cancel
Save