How can I run a Bash script from the master on a minion?
Use cmd.script
to download a script from a remote location and execute the script locally. The script can be located on the salt master file server or on an HTTP/FTP server.
The script will be executed directly, so it can be written in any available programming language.
The script can also be formatted as a template -- the default is Jinja. Arguments for the script can be specified as well.
CLI Example:
A string of standard input can be specified for the command to be run using the stdin
parameter. This can be useful in cases where sensitive information must be read from standard input.:
http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.cmdmod.html