Last active
March 14, 2018 10:42
-
-
Save stronk7/bf2cc77a6c5ac8ab05939bca72c64863 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
/usr/local/bin/salt-cron.sh: | |
file.managed: | |
- user: root | |
- group: root | |
- source: salt://system/cron/salt-cron.sh | |
- mode: 755 | |
/usr/bin/chronic /usr/local/bin/salt-cron.sh | /usr/bib/logger -t salt-cron: | |
cron.present: | |
- identifier: SALT | |
- user: root | |
- minute: '*/5' |
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
packages.moreutils: | |
pkg.installed: | |
- pkgs: | |
- moreutils |
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
#!/usr/bin/env bash | |
set -e | |
set -x | |
cd /srv/salt | |
/usr/bin/git fetch --all --prune | |
/usr/bin/git reset --hard origin/master | |
/usr/bin/salt-call \ | |
--local \ | |
--log-file-level=info \ | |
--state-output=changes \ | |
--state-verbose=false \ | |
state.apply |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment