Hi All,
I want to implement a logic for below requirement
block:
- name: A task
shell: grep '{{ item }} is present ' /in/a/file
register: output
with_items: "{{ host_group }}"
always:
- set_fact:
failed_items: <All the items for which the result is failed>
However, the output is a list. And each item in the list would contain rc,
whose value could be true or false based on the item in the group.
Is there a way to find the items for which the task is failed and construct
a final result string.
Thanks in advance,
Ramu
--
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/CAAfqp0UmJ%3D0m1nQW5DN7xFMN3fBAzc-zR%3DyW-NZ2K%2BwyumEx8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.