Hi All,
I have a question which I think should be pretty simple, I just can't find the exact syntax for doing that, so I hope you can help.
I using the salt orchestrate runner to implement a backup system in our network. Basically there is a machine called 'bkpserver' that we use to copy fiels from other machines (via rsync) and I am looking for a way to stick the rsync output into a jinja variable, so that I can write it into a grain.
I know I can do something like {% o = salt['cmd.run'] ... %} , but this is not going to help me since the command will run on the salt master, not on bkpserver,, so what I really need is to stick something like:
salt.function:
- name: run.cmd
- tgt: bkpserver
- arg:
- <command to cat the log file>
Into a {% o = salt[... %} statement.
Of course if someone can tell me of a better way to get the content of a file on one host into a grain on anther host, that would be even better.
Thanks in advance,
Oren