Hi can you show your vars also?
Variable_array particulary.
On Tuesday, April 1, 2014 12:56:21 AM UTC+2, James Goodhouse wrote:
>
> I see in the documentation then combining when with with_items will
> process the when statement for each item separately. Does this mean I
> cannot put a generic when statement on a task that has with_items?
>
> I'm trying to process a task only when a condition is met. For example, if
> variable xyz is desfined, then proceed with the task that has a with_items
> statement. Unfortunately, this does not work and returns the error
> "with_items expects a list or a set". I'm using the following chunk of code:
>
> - name: copy template to folder
> template:
> src: template.j2
> dest: /remote/file/location/{{ item.name }}
> owner: root
> group: root
> mode: 0600
> with_items: variable_array
> when: variable_array is defined
>
--
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/06a5b7d6-4be3-4854-a668-3ddae6acdea3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.