Skip to content

Instantly share code, notes, and snippets.

@rgbkrk
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rgbkrk/8696246 to your computer and use it in GitHub Desktop.
Save rgbkrk/8696246 to your computer and use it in GitHub Desktop.
Travis CI for Salt States
language: python
python:
- '2.7'
before_install:
# Make sure we're in a good state, then install salt via salt bootstrap
# -- Development mode, because danger is fun (I mean, it's good to stay up to date with salt)
- sudo apt-get update
- curl -L http://bootstrap.saltstack.org | sudo sh -s -- git develop
install:
# Copy the states
- sudo mkdir -p /srv/salt/states
- sudo cp -r . /srv/salt/states
- sudo cp .travis/minion /etc/salt/minion
- sudo service salt-minion restart
# Additional debug help
- sudo cat /var/log/salt/*
# See what kind of travis box you're on
# to help with making your states compatible with travis
- sudo salt-call grains.items --local
script:
- sudo salt-call state.show_highstate --local
# Within the repo, this should exist at .travis/minion (gists won't allow subdirs)
file_client: local
file_roots:
base:
- /srv/salt/states
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment