Hi Ben,

>From the error message it could seem like double quotes are required:

item=“{{item}}”

Eugene

On Wed, 17 Oct 2018 at 5:25 PM, Ben Joyce <[email protected]> wrote:

> Hi.  Has include_tasks been deprecated?  I have a playbook that used
> include_tasks fine up until recently.
>
> ansible-playbook --version reports 2.7.0
>
> Unfortunately I can't be sure of what the previous version was, if it was
> indeed different.
>
> Either way, include_tasks no longer works for me.  I get this error:
>
> ERROR! Invalid options for include_tasks: item
>
> The error appears to have been in
> '/vagrant/workspace/pcf-automation-infrastructure/ansible/bosh/prep.yml':
> line 53, column 7, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
>
>     - include_tasks: ../roles/common/tasks/download.yml item={{item}}
>       ^ here
> We could be wrong, but this one looks like it might be an issue with
> missing quotes.  Always quote template expression brackets when they
> start a value. For instance:
>
>     with_items:
>       - {{ foo }}
>
> Should be written as:
>
>     with_items:
>       - "{{ foo }}"
>
> If I use include instead it works.
>
> Any ideas?
>
> Cheers,
>
> Ben
>
> --
> 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/CAGWQ2KCH4BzQzpUvcNE7E4qg06m4Hesfu1TD6eMAgisgqx-jHQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAGWQ2KCH4BzQzpUvcNE7E4qg06m4Hesfu1TD6eMAgisgqx-jHQ%40mail.gmail.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/CAHYqtxk1hsA4k8M9O_y3DPFDOVrObSE586DuURqSU0ytu0LCxg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to