You can do something like one of the following options:
- debug:
msg: "{{ errors.list|map(attribute='ErrorMessage') }}"
- debug:
var: item.ErrorMessage
loop: "{{ errors.list }}"
Since ansible outputs JSONified results, you won't really get the result
you see with awk.
You could enable the debug callback plugin, and change the first one to
look like:
- debug:
msg: "{{ errors.list|map(attribute='ErrorMessage')|join('\n') }}"
On Fri, Nov 8, 2019 at 4:24 PM John Harmon <[email protected]>
wrote:
> This does it in bash, but I am trying to avoid scripting it:
>
> awk -F "\"*,\"*" '{print $2}' my.csv
>
> Results:
> resource has no content
> Blocked until the other thread finished using this session
> not found
> not found
> not found
> resource has no content
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/44dc83d9-3dd2-4714-96a0-18b8dbe46f5d%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/44dc83d9-3dd2-4714-96a0-18b8dbe46f5d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
Matt Martz
@sivel
sivel.net
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAD8N0v-s%2Br0KfjvB7crv6Ys6obBDJMOX4VJrAE0O11o8F1XhhA%40mail.gmail.com.