Hi. I think this situation hasn't changed in ansible v2.7 as well. There is no way I can find to repeat a particular task or a set of tasks within an existing playbook. It would have been great if we could use tags to call some "tagged-tasks again" wherever we want in a playbook OR create a new feature like 'goto or goback' as discussed in the above threads.
My scenario: I have to deal with 3 tasks A, B and C. Here C is dependent on A and B's performance. i.e If C's output is not as expected, then again A and B have to be repeated again. And somehow I cannot fit this in a 'block-rescue-always' structure as its pointless. Right now, I manage this using 'include_task' option along with 'when' conditional. I re-enter A and B tasks into a separate '.yml' file and then call it into this playbook using 'include_task' wherever I want. This solved my purpose but is ridiculous especially when we have so many other options to effectively orchestrate things using ansilble. Any inputs/thoughts on this would be helpful for me to explore more. -- 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/61c4f6a8-100e-4829-8f01-cc0d72f21800%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
