An open API service indexing awesome lists of open source software.

https://github.com/wenzel/salt-oneshot

A quick wrapper around SaltStack to quickly test and deploy a system configuration without having to set-up a Salt Master server.
https://github.com/wenzel/salt-oneshot

Last synced: about 1 month ago
JSON representation

A quick wrapper around SaltStack to quickly test and deploy a system configuration without having to set-up a Salt Master server.

Awesome Lists containing this project

README

          

salt-oneshot
============

This little project is just a bootstrap to easily try and deploy
a `SaltStack` configuration, without requiring to set up a salt master server.

Requirements
------------

- `Python >= 2.7`
- `virtualenv`

Setup
-----

git clone https://github.com/Wenzel/salt-oneshot
cd salt-oneshot
virtualenv venv
source venv/bin/activate
pip install docopt
./run.py --setup

Configure
---------

### Add your modules

- add your modules in the `salt` directory
- configure your pillars in the `pillar` directory

### Add a salt-formula

`salt-formulas` are ready to use salt modules maintained by the SaltStack community.

Since GitPython should have been installed in the virtualenv, you can make
use of `gitfs_remotes` to add some formulas in the `config/master`
configuration file, and let salt automatically download them :

gitfs_remotes:
- https://github.com/saltstack-formulas/openssh-formula

Apply
-----

To apply the configuration on your machine, just run :

./run.py localhost state.highstate

To apply it on a server :

./run.py example.com --user=foobar state.highstate

Usage
-----

"""
Usage:
run.py [options] -s
run.py [options] [...]

Options:
-s --setup Init salt submodule and install it into the current virtualenv
-u=USER --user=USER Connect to the host as USER (Only on remote host) [Default: root]
--pillar=PATH Set PATH as pillar root (Only on localhost)
--salt=PATH Set PATH as salt modules root (Only on localhost)
--config=PATH Set PATH as config directory
-v=LEVEL --verbosity=LEVEL Log verbosity (all | garbage | trace | debug | info | warning | error | critical | quiet) [Default: info]
-h --help Show this screen.
"""