Hi All,
I’m new here and have an issue that gives me a headache
I’m pretty new to ansible although I did the RH294 course.
Here’s my playbook:
Hi All,
I’m new here and have an issue that gives me a headache
I’m pretty new to ansible although I did the RH294 course.
Here’s my playbook:
When using a loop your normal results are under a 'results' list, you
can still used matched, but now you have ONE per item in the mentioned
list:
debug:
msg: "{{ find_result.resuilts[0].matched }}"
^ will give you 'matched' for the first item
to get all matches:
debug: msg={{ find_result.results|map(attribute='matched')|list }}
^ will show matches per item in a list
change `list` for `sum` to get a total.
Thanks for the input, I will give that a go.
With kind regards,
Cornelis