lookup plugins and with_

Noticed that lookup plugins currently don't work with the new-style
variable interpolation syntax (jinja2-style) when used in the
'with_LOOKUP' form.

Are there any plans to allow that, or even to allow bare variable names
as with the plain 'with_items' form (which seems to work as of now)?

This should work with the lastest devel branch {{ lookup(‘file’,‘/tmp/a’) }}

  • Benno

Excerpts from benno joy's message of 2013-04-16 10:56:55 -0400:

This should work with the lastest devel branch {{ lookup('file','/tmp/a') }}

Correct, but:

vars:
  foo:
    - /etc/resolv.conf
    - /etc/hosts
tasks:
  - debug: msg={{ item }}
    with_file: foo

  - debug: msg={{ item }}
    with_file: "{{ foo }}"

Neither of those two tasks will work (the latter being the concern,
really).

Can you please file a issue on github?

Excerpts from Michael DeHaan's message of 2013-04-16 12:05:30 -0400:

Can you please file a issue on github?

<https://github.com/ansible/ansible/issues/2696&gt;

Thanks, commented a bit.

with_items and with_nested should already be good, but we’ll do something more generic so we can reference them everywhere.