using register stdout_lines in with_items loop
groups.google.com › g › ansible-projectFeb 22, 2016 · with_items: " { { files.results|map (attribute='stdout_lines')|list }}" That would do it for you. That pulls the `stdout_lines` attribute out into a list of `stdout_lines`, then with_items natively handles the flattening, allowing you to loop over each individual item in the `ls` output. There is some documentation about using register with a ...