https://docs.ansible.com/ansible/latest/user_guide/playbooks_strategies.html#setting-the-batch-size-with-serial
On Sun, 28 Feb 2021 at 20:35, Vikram S <[email protected]> wrote: > I have written a script to do IOS upgrade of cisco devices. However > problem is that each TASK in playbook gets executed SIMULTANEOUSLY on all > devices defined in inventory file before moving on to next TASK. > > But my requirement is: > > 1. I want to complete IOS upgrade of 1 device first and only after that, > move on to 2nd device > > 2. If IOS upgrade of 1st device fails for some reason, then IOS upgrade > activity should not proceed any further. > > > 1 solution i can think for 1st point is to write multiple plays within a > single playbook and then define 1 host in 1 play but that would be m ake > the playbook extremely long (if i decide to upgrade 20 devices for example). > > Please suggest what other script needs to be added to achive both the > objectives? > > > Thanks, > > Vikram > > -- > 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/9949a79b-ab37-4791-b149-688dbdf406fan%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/9949a79b-ab37-4791-b149-688dbdf406fan%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Sent from a mobile device - please excuse the brevity, spelling and punctuation. -- 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/CAL8fbwOfJ4tiJ9eztxwpMzLK5zP3Sk6jVeWK-GkyThaSHa3kSw%40mail.gmail.com.
