I don't have any examples for you, but Ansible is definitely the right tool for this kind of orchestration. I'm sure someone here can provide some samples.
You'll want to write a playbook that enumerates these steps. Use the "serial" directive in your play so that only one server is touched at once before moving on to the next. This documentation page should be helpful: http://docs.ansible.com/playbooks_conditionals.html#applying-when-to-roles-and-includes On Thu, Apr 10, 2014 at 10:32 AM, Vladimir Mihailenco < vladimir.web...@gmail.com> wrote: > Hello, > > I have 2 Ansible groups: > - nginx_servers. > - api_servers. > > I am trying to automate following: > 1. Select 1 API server. > 2. Mark selected API server as down in the all nginx configs. Reload nginx. > 3. Restart selected API server. > 4. Mark selected API server as up in the all nginx configs. > 5. Goto 1. until all API servers are restarted. > > Should I use Ansible for this? Any suggestions? hints? code samples? > > -- > 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 ansible-project+unsubscr...@googlegroups.com. > To post to this group, send email to ansible-project@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/31974a08-c3af-48ae-887f-2a2e4f6fae73%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/31974a08-c3af-48ae-887f-2a2e4f6fae73%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAK6JQEG%3DxMDWWsAkwqweQjX%3D2JYgiZPR-hqqF8-1K3AQcZzWfQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.