2015-05-26 16:41:04 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=jinja
|
2015-03-17 05:39:32 +01:00
|
|
|
|
2015-05-26 16:41:04 +02:00
|
|
|
{## Start with defaults from defaults.yaml ##}
|
|
|
|
{% import_yaml "salt/defaults.yaml" as default_settings %}
|
2015-03-17 05:39:32 +01:00
|
|
|
|
2015-12-05 11:24:05 +01:00
|
|
|
{##
|
2015-05-26 16:41:04 +02:00
|
|
|
Setup variable using grains['os_family'] based logic, only add key:values here
|
|
|
|
that differ from whats in defaults.yaml
|
|
|
|
##}
|
|
|
|
{% set os_family_map = salt['grains.filter_by']({
|
2015-08-20 06:46:49 +02:00
|
|
|
'Debian': {
|
2015-12-05 11:24:05 +01:00
|
|
|
'pkgrepo': 'deb http://debian.saltstack.com/debian ' + salt['grains.get']('oscodename') + '-saltstack main',
|
2016-03-29 19:36:46 +02:00
|
|
|
'key_url': 'salt://salt/pkgrepo/debian/saltstack.gpg',
|
2015-08-20 06:46:49 +02:00
|
|
|
'libgit2': 'libgit2-22',
|
|
|
|
'gitfs': {
|
|
|
|
'pygit2': {
|
|
|
|
'install_from_source': True,
|
|
|
|
'version': '0.22.1',
|
2015-09-01 23:28:27 +02:00
|
|
|
'git': {
|
|
|
|
'require_state': False,
|
|
|
|
'install_from_package': 'git',
|
|
|
|
},
|
2015-08-20 06:46:49 +02:00
|
|
|
'libgit2': {
|
|
|
|
'install_from_source': False,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2015-06-02 21:40:53 +02:00
|
|
|
'RedHat': {
|
|
|
|
'pygit2': 'python-pygit2',
|
|
|
|
'gitfs': {
|
|
|
|
'pygit2': {
|
2015-09-01 23:28:27 +02:00
|
|
|
'install_from_source': False,
|
|
|
|
'git': {
|
|
|
|
'require_state': False,
|
|
|
|
'install_from_package': 'git',
|
|
|
|
},
|
2015-06-02 21:40:53 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'master': {
|
|
|
|
'gitfs_provider': 'pygit2'
|
|
|
|
},
|
2015-08-20 06:46:49 +02:00
|
|
|
'repotype': 'epel',
|
2015-06-02 21:40:53 +02:00
|
|
|
},
|
2015-05-26 16:41:04 +02:00
|
|
|
'Suse': {},
|
|
|
|
'Gentoo': {
|
|
|
|
'salt_master': 'app-admin/salt',
|
|
|
|
'salt_minion': 'app-admin/salt',
|
|
|
|
'salt_syndic': 'app-admin/salt',
|
|
|
|
'salt_api': 'app-admin/salt',
|
2015-08-20 06:46:49 +02:00
|
|
|
'salt_cloud': 'app-admin/salt',
|
2015-05-26 16:41:04 +02:00
|
|
|
},
|
|
|
|
'Arch': {
|
|
|
|
'salt_master': 'salt-zmq',
|
|
|
|
'salt_minion': 'salt-zmq',
|
|
|
|
'salt_syndic': 'salt-zmq',
|
|
|
|
'salt_cloud': 'salt-zmq',
|
|
|
|
'salt_api': 'salt-zmq',
|
2015-08-20 06:46:49 +02:00
|
|
|
'salt_ssh': 'salt-zmq',
|
2015-05-26 16:41:04 +02:00
|
|
|
},
|
|
|
|
'FreeBSD': {
|
|
|
|
'salt_master': 'py27-salt',
|
|
|
|
'salt_minion': 'py27-salt',
|
|
|
|
'salt_syndic': 'py27-salt',
|
|
|
|
'salt_cloud': 'py27-salt',
|
|
|
|
'salt_api': 'py27-salt',
|
2015-07-24 22:11:23 +02:00
|
|
|
'salt_ssh': 'py27-salt',
|
2015-07-24 22:30:02 +02:00
|
|
|
'python_git': 'py27-GitPython',
|
2015-07-24 23:06:15 +02:00
|
|
|
'pygit2': 'py27-pygit2',
|
2015-05-26 16:41:04 +02:00
|
|
|
'config_path': '/usr/local/etc/salt',
|
|
|
|
'minion_service': 'salt_minion',
|
|
|
|
'master_service': 'salt_master',
|
|
|
|
'api_service': 'salt_api',
|
2015-08-20 06:46:49 +02:00
|
|
|
'syndic_service': 'salt_syndic',
|
2015-05-26 16:41:04 +02:00
|
|
|
},
|
2016-03-23 02:15:44 +01:00
|
|
|
'Windows': {
|
|
|
|
'salt_minion': 'saltstack.minion',
|
|
|
|
'config_path': 'C:\salt\conf',
|
|
|
|
'minion_service': 'salt-minion',
|
|
|
|
},
|
2015-08-20 06:46:49 +02:00
|
|
|
}, grain="os_family", merge=salt['pillar.get']('salt:lookup'))
|
2015-05-26 16:41:04 +02:00
|
|
|
%}
|
2015-03-17 05:39:32 +01:00
|
|
|
|
2015-05-26 16:41:04 +02:00
|
|
|
{## Merge the flavor_map to the default settings ##}
|
|
|
|
{% do default_settings.salt.update(os_family_map) %}
|
2015-08-20 06:46:49 +02:00
|
|
|
|
2015-05-26 16:41:04 +02:00
|
|
|
{## Merge in salt:lookup pillar ##}
|
|
|
|
{% set salt_settings = salt['pillar.get'](
|
|
|
|
'salt',
|
|
|
|
default=default_settings.salt,
|
2015-08-20 06:46:49 +02:00
|
|
|
merge=True)
|
2015-05-26 16:41:04 +02:00
|
|
|
%}
|