If there is some condition that can be tested externally, then why not a
simple script that calls ansible-playbook until that condition obtains?

On Sun, Mar 24, 2019 at 8:37 PM Raghavendra Rao <[email protected]>
wrote:

> 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
> <https://groups.google.com/d/msgid/ansible-project/61c4f6a8-100e-4829-8f01-cc0d72f21800%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Karl Auer

Email  : [email protected]
Website: http://2pisoftware.com

GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA

-- 
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/CA%2B%2BT08Sy4_dN3hO5NNhObEx%2BL-oaEzTs423ZVStJfhsvj3ek3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to