Yes, removing [0] worked!! 
I am learning ansible using a udemy tutorial and i am practising sample 
playbook in tutorial in GNS3. I am not sure why it worked for the author to 
save output of multiple commands with [0] present. It's a 3 yr old course, 
probably something changed in ansible recently.

On Monday, 8 February, 2021 at 8:00:23 pm UTC+5:30 Brian Coca wrote:

> This will only print the first element of 'stdout', remove the [0] to
> get the full thing.
>
> print_output.stdout[0]
>
> vs
>
> print_output.stdout
>
> -- 
> ----------
> Brian Coca
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7fa47ffa-de92-4a8d-bdea-83b49773dedfn%40googlegroups.com.

Reply via email to