Thanks a bunch Felix, I'll have a look at it !! /Alex On Monday, March 30, 2020 at 1:51:46 PM UTC+2, Felix Fontein wrote: > > Hi Alex, > > > I am currently developing a module (actually for windows over ssh). > > The module requires a filetransfer from the controller. Of course I > > could just use win_copy first, but I would like the module to be more > > self-contained. > > > > But I cannot work out how to achieve a filetransfer. I have looked at > > copy/win_copy, but the module code only deals with the steps on the > > target. The filetransfer itself seems to be happening by magic. > > Further more, I tried to rename the win_copy module and ran it again > > with exactly the same parameters. In the latter case the src > > parameter is just passed as a string, and no magic filetransfers > > occurs. > > > > The questions are: > > > > What triggers the src parameter to be treated as a file (eligible for > > filetransfer) and not just a string ? > > Can I find some documentation on the subject ? (I have seen the > > developing modules doc, and I don't see anything there) > > you want to look for "action plugins". They run on the controller and > can copy files from/to the remote nodes, and execute modules (also > different ones and multiple ones). "copy" is a combination of action > plugin and module: the action plugin copies the file(s) and then calls > the module with the temp path the files were copied to. > > Cheers, > Felix > > > > > > Regards Alex > > >
-- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/46a944a8-c877-4115-901f-926805d4089a%40googlegroups.com.