Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated map.jinja for archlinux package convention #90

Merged
merged 2 commits into from
Feb 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
salt:

# to overwrite map.jinja salt packages
lookup:
salt-master: 'salt-master'
salt-minion: 'salt-minion'
salt-syndic: 'salt-syndic'
salt-cloud: 'salt-cloud'
salt-ssh: 'salt-ssh'

# salt master config
master:
fileserver_backend:
- git
Expand All @@ -9,6 +19,8 @@ salt:
file_roots:
base:
- /srv/salt

# salt minion config:
minion:
master: salt
fileserver_backend:
Expand All @@ -29,6 +41,8 @@ salt:
test.baz:
spam: sausage
cheese: bread

# salt cloud config
cloud:
master: salt
folders:
Expand Down
20 changes: 7 additions & 13 deletions salt/map.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set map = {
{% set salt = salt['grains.filter_by']({
'Debian': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
Expand Down Expand Up @@ -33,11 +33,11 @@
'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',
'salt-ssh': 'salt'},
'Arch': {'salt-master': 'salt-zmq',
'salt-minion': 'salt-zmq',
'salt-syndic': 'salt-zmq',
'salt-cloud': 'salt-zmq',
'salt-ssh': 'salt-zmq'},
'openSUSE':{'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
Expand All @@ -51,10 +51,4 @@
'minion-service': 'salt_minion',
'master-service': 'salt_master',
'syndic-service': 'salt_syndic'},
} %}

{% 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 %}
}, merge=salt['pillar.get']('salt:lookup')) %}