Skip to content

Instantly share code, notes, and snippets.

Created June 8, 2017 22:49
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 anonymous/ea9895455f6be08745eeca9878fdcbc6 to your computer and use it in GitHub Desktop.
Save anonymous/ea9895455f6be08745eeca9878fdcbc6 to your computer and use it in GitHub Desktop.
github.deploy.saltmaster
ensure git is installed:
pkg.installed:
- name: git
- reload_modules: true
salt-repo-fetch:
module.run:
- name: git.fetch
- cwd: '/srv/salt'
- remote: 'origin'
- refspecs: 'master'
- require:
- pkg: git
salt-checkout-reset:
module.run:
- name: git.reset
- cwd: '/srv/salt'
- opts: '--hard origin/master'
- require:
- sls: salt-repo-fetch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment