Custom lookup should still be invoked using the `lookup` function,
something like:

myproperty={{ lookup('my_custom_lookup', my_custom_var1) }}

And you would need to use the `template` module as a task to get that
templating to be run.  No need for copy, as template can handle a
destination.

On Wed, May 25, 2016 at 7:52 AM, mhh <[email protected]> wrote:

> Hello, is possible to run custom lookups in file and copy this file to
> another destionation just like in my example?
> Or is there any other approach to solve it?
> Thanks
>
>
>     #/path/to/file.properties
>
>
>     myproperty={{ my_custom_lookup('{{ my_custom_var1 }}') }}
>     myproperty2={{ my_custom_lookup('{{ my_custom_var2 }}') }}
>
>
> ansible playbook play:
>
>     - hosts: localhost
>       vars:
>           my_custom_var1: var1
>           my_custom_var2: var2
>
>       tasks:
>         -run lookups in /path/to/file.properties and copy file to another
> destination
>
> --
> 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/88286d38-edba-4ac0-b01d-56fc328b2a2b%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/88286d38-edba-4ac0-b01d-56fc328b2a2b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
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/CAD8N0v9RGc34KbVOrTbi7pT%2B68LjfdR9TXfNxqKNOJNPMOpQCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to