Skip to content

Instantly share code, notes, and snippets.

Created November 24, 2016 00:42
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/112c6a92c3f67395ee03f8960668af48 to your computer and use it in GitHub Desktop.
Save anonymous/112c6a92c3f67395ee03f8960668af48 to your computer and use it in GitHub Desktop.
/usr/local/scripts/checkstuff.sh:
file.managed:
- source: salt://basis_states/files/checkstuff.sh
- create: True
- user: root
- group: root
- mode: 755
# Trigger the run of the script when the file changes
checkstuff:
cmd.run:
- name: /usr/local/scripts/checkstuff.sh
- cwd: /
- env:
- PATH: {{ [ '/bin', '/usr/bin', '/sbin', '/usr/sbin' ] }}
- require:
- file: /usr/local/scripts/checkstuff.sh
- onchanges:
- file: /usr/local/scripts/checkstuff.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment