|
Stephen Spencer |
at Nov 5, 2014 at 8:20 pm
|
⇧ |
| |
Heya,
The execution modules are available via the salt dunder; thusly,
__salt__['cp.get_file'] ('salt://path/target', '/path/on/minion/target')
You can also import the salt.modules.cp module directly if you feel so
inclined. I will sometimes go that route if I'm doing a lot of debugging
outside of the full salt context.
-S
On Nov 5, 2014 1:38 PM, "Joey" wrote:I am using CentOS6.5. I can successfully copy a file from master to a
minion with id=minionId by running the following command on the master:
salt minionId cp.get_file salt://fileInMaster.txt
/home/johnDoe/fileNowInMinion.txt ##run on master
If I have to accomplish the exact same thing using python how do I do it?.
I want to run a python script on master that copies a file from master to a
specific minion with given Id
--
You received this message because you are subscribed to the Google Groups
"Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to
[email protected].
For more options, visit
https://groups.google.com/d/optout. --
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[email protected].
For more options, visit
https://groups.google.com/d/optout.