Any sort of lead would be appreciated On Saturday, 24 April 2021 at 16:07:37 UTC+5:30 sumith nair wrote:
> 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/bbb2fc82-4701-4976-8b85-a4adb12d3d0dn%40googlegroups.com.
