When you say something doesn't work for you, please describe HOW it doesn't work.
It's unclear if you hit a traceback that we need to deal with or what. But no, with_first_found is designed to implement inline loops, not to be used like that. Some lookup plugins are for simple strings, others provide iterators. I agree this is somewhat confusing but that's why we show them seperately in the docs with appropriate-ish examples for each. On Fri, Jul 25, 2014 at 3:56 AM, Klokkie <[email protected]> wrote: > I found that the inline lookup "src={{ > lookup('first_found', ['path/to/zones/' + > item > > + '.db' > > , 'path/to/zones/default + '.db']) > }}" did not quite work for me. > The following example did the trick (for me) tho. > > As an example: > >> - name: Context.xml >> template: src={{ item.1 }} dest=/opt/tomcat-{{item.0.name >> }}/conf/context.xml >> with_nested: >> - datastructureofsomekind >> - lookup('first_found', ['../../templates/' + env + '/context.xml', >> '../../templates/tomcat/context.xml' ]) >> > -- > 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/b213b365-7e33-4e4f-9fa7-fc67dab01833%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/b213b365-7e33-4e4f-9fa7-fc67dab01833%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%2BnsWgz1n%3DzPMWQAHf22uR7StqmF2Nzz6iwOZUoSU5DXW5z8hA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
