A curated collection of working salt states and configurations for use in your SaltStack setup.
Goals: The aim of this project is to create a collection of Salt states with the following characteristics:
- Easy to integrate with custom Salt setups.
- Abstracts out differences in package names to simplify package installation.
- Stable, with versioned 'releases' to guarantee compatibility as the project proceeds.
- Well-tested, with comprehensive tests built for every state. (TODO!)
- Flexible and Object-oriented, making it easy to extend and customize without modifying SaltMine code.
- Community-oriented, with external contributions quickly reviewed and integrated.
- Fun!
SaltMine's structure is designed to meet the day-to-day needs of regular saltstack users. The structure has gone through many iterations so far, and there is a certain philosophy underpinning many of the design choices. Take a look at our SaltMine Standards document for more information.
Please contribute your Salt states here by opening a pull request on GitHub. Develop and test contributions using
the develop
branch, and open pull requests to the develop
branch only, since that is where all development
and testing occurs prior to each stable saltmine release.
- salt >= 0.12.0
- mako >= 0.7.3
- python >= 2.6
The initial goal is to maintain compatibility with mainstream RHEL and Debian distributions. If people show interest in additional compatibility, please let us know by adding it as a GitHub issue, or open pull requests with your modifications that add compatibility for your favorite repos.
- Make sure that you have a working Salt installation (including mako)
- Clone the SaltMine repo, (recommended cloning to /srv/) and include the SaltMine base directory in the file_roots setting of your salt master.
- To make the SaltMine configs available to salt minions in all environments, (recommended) add the SaltMine repo base directory to your
base
environment. - To use a specific SaltMine version, simply checkout the version branch that you want to pin your install to. For example:
git checkout 0.1.2
- To use the latest stable SaltMine version, use the 'master' branch.
git checkout master
If you cloned SaltMine within the /srv/ directory, ensure that the /srv/saltmine
directory is added to the base
file_roots environment in your Salt master config file:
file_roots:
base:
- /srv/saltmine
- Some of the states rely on pillar variables, so also add the saltmine pillar to the
pillar_roots
in your Salt master config file:
pillar_roots:
base:
- /srv/saltmine/pillar
Alternatively, you can just add the appropriate variables to your current pillar files.
Once the SaltMine repo is included into your file_roots, to use SaltMine configs in your salt setup, simply include
the appropriate service or state.
Examples:
include:
- saltmine.pkgs.git
include:
- saltmine.services.haproxy
- Code is licensed using Apache License 2.0