Skip to content

Commit

Permalink
Merge pull request #351 from colin-stubbs/master
Browse files Browse the repository at this point in the history
pillar.example is incorrect; package name for windows is incorrect #350
  • Loading branch information
aboe76 authored Jan 6, 2018
2 parents 8268d83 + 32f3104 commit b15ce1c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
10 changes: 5 additions & 5 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ 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: 'salt-master'
salt_minion: 'salt-minion'
salt_syndic: 'salt-syndic'
salt_cloud: 'salt-cloud'
salt_ssh: 'salt-ssh'
pyinotify: 'python-pyinotify' the package to be installed for pyinotify

# Set which release of SaltStack to use, default to 'latest'
Expand Down
15 changes: 11 additions & 4 deletions salt/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# vim: ft=jinja

{%- macro deep_merge(a, b) %}
{#- This whole `'dict' in x.__class__.__name__` mess is a
workaround for the missing mapping test in CentOS 6's
{#- This whole `'dict' in x.__class__.__name__` mess is a
workaround for the missing mapping test in CentOS 6's
ancient Jinja2, see #193 #}
{%- for k,v in b.items() %}
{%- if v is string or v is number %}
{%- do a.update({ k: v }) %}
{%- elif 'dict' not in v.__class__.__name__ %}
{%- if a[k] is not defined %}
{%- do a.update({ k: v }) %}
{%- elif a[k] is iterable and 'dict' not in a[k].__class__.__name__ and
{%- elif a[k] is iterable and 'dict' not in a[k].__class__.__name__ and
a[k] is not string %}
{%- do a.update({ k: v|list + a[k]|list}) %}
{%- else %}
Expand Down Expand Up @@ -156,10 +156,17 @@ that differ from whats in defaults.yaml
'python_git': 'py-GitPython',
},
'Windows': {
'salt_minion': 'saltstack.minion',
'salt_minion': 'salt-minion',
'config_path': 'C:\salt\conf',
'minion_service': 'salt-minion',
},
'MacOS': {
'salt_minion': 'com.saltstack.salt',
'salt_minion_pkg_source': 'https://repo.saltstack.com/osx/salt-' + salt_release + '-py2-x86_64.pkg',
'salt_minion_pkg_hash': '',
'config_path': '/private/etc/salt',
'minion_service': 'com.saltstack.salt.minion',
},
}, merge=salt['grains.filter_by']({
'Ubuntu': {
'pkgrepo': 'deb http://repo.saltstack.com/apt/' +
Expand Down
3 changes: 3 additions & 0 deletions salt/minion.sls
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% from "salt/map.jinja" import salt_settings with context %}
{% if grains.os != "MacOS" %}
salt-minion:
{% if salt_settings.install_packages %}
pkg.installed:
Expand Down Expand Up @@ -83,3 +84,5 @@ remove-default-minion-conf-file:
remove-old-minion-conf-file:
file.absent:
- name: {{ salt_settings.config_path }}/minion.d/_defaults.conf
{% endif %}

0 comments on commit b15ce1c

Please sign in to comment.