FAQ
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 salt-users+unsubscribe@googlegroups.com.
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 salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupsalt-users @
postedNov 5, '14 at 7:38p
activeNov 5, '14 at 8:20p
posts2
users2

2 users in discussion

Joey: 1 post Stephen Spencer: 1 post

People

Translate

site design / logo © 2022 Grokbase