Search code examples
pythongitsalt-project

Run script bash on saltstack master before minion


I allow myself to write to you, due to a block on my part at Salt.

I made a bash script that adds a host in my zabbix monitoring server. it works perfectly when I run .sh

the idea is that I want to automate this configuration through salt. I am when I do a highstate my state that contains the script runs in the master before minion because there's my login authentication in my bash script.

Is there's a special configuration for its? is what you have ideas how to do like this kind of setup? according to my research I found that to be used as the salt-runner but I do not know if this is good or not;

In anticipation of your return, I wish you a good weekend.


Solution

  • If you need the highstate on the minion to cause something to occur on the master than you are going to want too look into using salt's Reactor (which is designed to do exactly this kind of multi-machine stuff).