Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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