Created
June 17, 2013 22:05
-
-
Save BrianHicks/5800920 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git-remote: | |
root: /opt/git-remote | |
repos: | |
- name: salt-repo | |
hooks: | |
post-receive: | | |
#!/bin/bash | |
echo "-------- pulling to /srv/salt --------" | |
test -d /srv/salt || mkdir -p /srv/salt | |
pushd /srv/salt | |
test -d .git || git init . | |
git remote | grep -q local || git remote add local /opt/git-remote/salt-repo | |
git pull local master | |
popd | |
echo "-------- running highstate --------" | |
salt-call state.highstate --log-level warning |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment