How do I output the contents of a file on all my minions using Salt Stack?
The only 'pull' functionality I can find is in this minion push commit, but this requires configuration changes on the master.
How do I output the contents of a file on all my minions using Salt Stack?
The only 'pull' functionality I can find is in this minion push commit, but this requires configuration changes on the master.
Solution using
cmd.run
module:Get the contents of a file without using external commands:
This feature was added on a later version of Salt, you can find it in the salt official documentation on this link.
You can push a file from a salt minion to the master by issuing this command:
Keep in mind that you need to enable it on the salt master configuration file before by setting the
file_recv
option toTrue