Easiest way is to run the module via local_action. Otherwise you'll have to write an action_plugin which is overkill and much more low level (less heavy-lifting already done for you), and you'll have to understand how that works.
Note that the copy module works via a pair of modules, the action_plugin and the remote component. On Sun, Jul 13, 2014 at 2:00 PM, Gregor Giesen <[email protected]> wrote: > Hello everyone, > > I try to write a module which reads a local file (e.g. from a playbook). > How can I achieve it? > > I've tried to start with the "copy" module which reads a local file given > by the src argument. As far as I understand, ansible copies temporarily the > "src"-file to the node where the copy script can access it. But when I put > the copy module under a different name in my playbook libraries directory, > it tries to access the "src"-file on the node. > > Thanks in advance, > Gregor > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/df80194d-4903-44f0-87e9-ad577330f1ca%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/df80194d-4903-44f0-87e9-ad577330f1ca%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwyy_r6CdLSkBBj-pZzX%3D_ETwmnBfHeGa3mJ-HXLc8u3Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
