Just out of curiosity, if not with lookup('first_found',...) how would you 
do 

....
with_items: itemlistvar
with_first_found:
 - file1
 - file2
 - etc..

Are you suggesting:
with_nested:
  - itemlistvar
  - lookup('first_found', ... )


On Tuesday, 14 January 2014 15:16:01 UTC, Michael DeHaan wrote:
>
> It's not really intended that first_found be used in this way, because 
> it's a plugin that returns lists to iterate on, as opposed to 'file'.
>
> However, it is definitely something that will continue to work.
>
> It just wouldn't make sense using with_items with, say, 'items' in the 
> lookup, for that, go to things like 'with_nested'.
>
>
>
>
> On Tue, Jan 14, 2014 at 3:37 AM, <[email protected] <javascript:>> wrote:
>
>> Hi Serge,
>>
>> This worked great, thank you. I didn't realize that you could use the 
>> with_* functions with lookup(), now things makes a lot more sense.
>>
>> Best regards,
>> /Martin
>>
>> Something like this might work:
>>> - name: Copy zone files
>>>   copy: src={{ 
>>> lookup('first_found', ['path/to/zones/' + 
>>> item
>>>  + '.db'
>>> , 'path/to/zones/default + '.db'])
>>> }} dest=/var/named/zones/{{ item }}
>>>   with_items:
>>>     - list_of_zones
>>>
>>>
>>> Serge
>>>
>>>  -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Michael DeHaan <[email protected] <javascript:>>
> CTO, AnsibleWorks, Inc.
> http://www.ansibleworks.com/
>
>  

-- 
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/2a0e5fcc-1ae5-48a3-9f45-87dccc724b40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to