All,

As part of my playbook, i'd like to know the list of hosts where a certain 
task executed and changed something or got failed. Since i need to use 
those hosts in the very next task in same playbook for some other action.

Example: If i've got 10 hosts for a playbook, and below task changed/failed 
on 5 out of the 10 and skipped other 5, i need to gather those affected 5 
hosts into a variable maybe, then use that in next task.

          - name: update file count

            shell: "echo 2 > /home/ec2-user/abcd.txt"

            when:

                    - count.stdout == "1"

            register: update1


Thank you.


-- 
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/a1a39b80-b721-4e48-bc90-9c8844aa4b17n%40googlegroups.com.

Reply via email to