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/1756722.nz7os0Egr4%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to