2

Is there a way to run a command (or state) on the salt-master whenever salt 'myminion' state.highstate is run, but before the minion's highstate is executed?

The command is svn update or (svn.latest), so there will be files in /srv/salt available to the minion. svnfs won't work for me because of directory structure constraints. I also found that you can't add custom filesystems (without modifying salt's source).

I was hoping the Reactor system would help, but I am not sure if it can be used for this case.

EDIT:
Another possible solution is to write a SVN post-commit hook, but I'd rather not.

4

You could create a custom runner that would execute your svn commands and then run your highstate as needed.

There are a lot of good example here: https://github.com/saltstack/salt/tree/develop/salt/runners

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.