secondvar.results is a list of dictionaries, that has keys like 'stdout' and 
'stdout_lines'

So secondvar.results[0].stdout would give you the stdout of the first iteration

If you are looking to again loop over all items in stdout_lines for each 
iteration, you need to do something like

  - debug: var=item
    with_flattened: secondvar.results|map(attribute='stdout_lines')|list
-- 
Matt Martz
[email protected]

On April 24, 2014 at 1:18:03 PM, Michael Baydoun ([email protected]) wrote:

If I debug all of secondvar I can see the output I want, and it looks like it 
should be contained in secondvar.results.stdout, but if I try to debug 
seconvar.results.stdout I only get 

"secondvar.results.stdout": "{{ secondvar.results.stdout }}"



On Thu, Apr 24, 2014 at 2:12 PM, Michael Baydoun <[email protected]> wrote:
I get the same results after making the suggested change


On Thu, Apr 24, 2014 at 2:07 PM, Serge van Ginderachter 
<[email protected]> wrote:

with fistvar you use that list of lines, so

secondvar is the registered output of a loop, which means you have
"several sets of results"



change

debug: var=secondvar.stdout_lines

to

debug: var=secondvar.results.stdout_lines





HTH,





Serge


On 24 April 2014 20:03, Michael Baydoun <[email protected]> wrote:
Small playbook that reproduces behavior 
https://gist.github.com/IndyMichaelB/11263577
First comment shows the output
--
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/CADgbg8JJ0nSut%3DEFiexZWrWC3LvSWY8nWL1HJPKuCerA9GK2_A%40mail.gmail.com.
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/CAEhzMJDVWTBbTPXGHovu-ZAYz5aAs6geONzu_jfaDpCMDfDYWw%40mail.gmail.com.
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/CADgbg8%2BVb6uTc-cV1s90PUSEwBX%2BTXXCZ%2BbF-z3r3cCTV1GK7A%40mail.gmail.com.
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/etPan.53595a0e.6b8b4567.f9e1%40mobiletuvix.rackspace.corp.
For more options, visit https://groups.google.com/d/optout.

Reply via email to