Hi,
Need help to fetch output from the below output message.
Bascially I need to extract “packet_loss”, “packets_rx”, “packets_tx”, “rtt_avg”, “rtt_max” & “rtt_min” for each “item”.
Trying to use the code as
Code
=============:
- debug:
var: “{{ item[‘packet_loss’] }}”
with_items: “{{ output.results }}”
May be you could try something like this. Register your output to some variable let’s call it X. Then try to debug like below example.
Am exactly sure but, you can give a try.
var=“{X.results._ansible_item_label.{item}}”
with_item:
Tried however doesnt work.
=> template error while templating string: expected name or number. String: {{{output.results._ansible_item_label.{item}}}}’
Hi Jonathan,
Didn’t get what is meant by following the link.
Best Regards
Diptajeet
You mentioned you needed debug output and I linked the docs that mentioned how to do it.
Ok but it was stuck mostly with parsing the debug output.
Best Regards
Diptajeet