I see. Referencing the 0 explicitly on the end has resolved the problem.
Thanks!
Ian
On Thursday, February 15, 2018 at 1:21:15 PM UTC-7, Kai Stian Olstad wrote:
>
> On Thursday, 15 February 2018 20.44.16 CET Ian Barrere wrote:
> > If I use the operator "with_items", this works correctly, as apparently
> > with_items flattens the first level but nothing after that. However, the
> > deprecation warning has suggested that we migrate to "loop" instead.
> Does
> > anybody know how to emulate the flattening behavior of with_items with
> the
> > loop operator?
>
> There is no difference between them
>
> - debug:
> msg: "{{ item }}"
> when: "'root' not in item"
> with_items: "{{ usernames.stdout_lines.0 }}"
>
> - debug:
> msg: "{{ item }}"
> when: "'root' not in item"
> loop: "{{ usernames.stdout_lines.0 }}"
>
>
> --
> Kai Stian Olstad
>
--
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/a7c915af-e975-40b2-ace8-c2be48bf5697%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.