Added salt-api support

This commit is contained in:
Niels Abspoel 2015-03-07 23:43:32 +01:00
parent 61a7bc1ddc
commit 5785091305
3 changed files with 31 additions and 0 deletions

View File

@ -41,6 +41,12 @@ Install salt cloud.
Install salt-ssh with roster file.
Configure pillar data under salt:ssh_roster to feed the template.
``salt.api``
------------
Install salt api
Requisite: Configure salt-master with rest_cherrypy or rest_tornado.
``salt.standalone``
-------------------

14
salt/api.sls Normal file
View File

@ -0,0 +1,14 @@
{% from "salt/map.jinja" import salt with context %}
include:
- salt.master
salt-api:
pkg.installed:
- name: {{ salt['salt-api'] }}
service.running:
- name: {{ salt.get('api-service', 'salt-api') }}
- require:
- service: {{ salt.get('api-service', 'salt-master') }}
- watch:
- pkg: salt-master

View File

@ -3,52 +3,63 @@
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-api': 'salt-api',
'salt-ssh': 'salt-ssh'},
'Ubuntu': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-api': 'salt-api',
'salt-ssh': 'salt-ssh'},
'CentOS': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-api': 'salt-api',
'salt-ssh': 'salt-ssh'},
'Amazon': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-api': 'salt-api',
'salt-ssh': 'salt-ssh'},
'Fedora': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-api': 'salt-api',
'salt-ssh': 'salt-ssh'},
'RedHat': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-cloud': 'salt-cloud',
'salt-api': 'salt-api',
'salt-ssh': 'salt-ssh'},
'Gentoo': {'salt-master': 'app-admin/salt',
'salt-minion': 'app-admin/salt',
'salt-syndic': 'app-admin/salt',
'salt-api': 'app-admin/salt',
'salt-cloud': 'app-admin/salt'},
'Arch': {'salt-master': 'salt-zmq',
'salt-minion': 'salt-zmq',
'salt-syndic': 'salt-zmq',
'salt-cloud': 'salt-zmq',
'salt-api': 'salt-zmq',
'salt-ssh': 'salt-zmq'},
'Suse': {'salt-master': 'salt-master',
'salt-minion': 'salt-minion',
'salt-syndic': 'salt-syndic',
'salt-api': 'salt-api',
'salt-cloud': 'salt-cloud',
'salt-ssh': 'salt-ssh'},
'FreeBSD': {'salt-master': 'py27-salt',
'salt-minion': 'py27-salt',
'salt-syndic': 'py27-salt',
'salt-cloud': 'py27-salt',
'salt-api': 'py27-salt',
'config-path': '/usr/local/etc/salt',
'minion-service': 'salt_minion',
'master-service': 'salt_master',
'api-service': 'salt_api',
'syndic-service': 'salt_syndic'},
}, merge=salt['pillar.get']('salt:lookup')) %}