This should be easy with ansible... make sure you use 'serial 1' ... so you
only work on one host at a time.
Then use 'delegate_to' tasks to remove/add the hosts to your nginx
config/reload configs

Mark


On Thu, Apr 10, 2014 at 4:32 PM, Vladimir Mihailenco <
[email protected]> 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 [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/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.
>



-- 
Mark Janssen  --  maniac(at)maniac.nl
Unix / Linux Open-Source and Internet Consultant
Maniac.nl Sig-IO.nl Vps.Stoned-IT.com

-- 
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/CAKs9mshr_RgfbekxJKR6%2BoJjryq%2BmF9_4%3DCqp3hqzmCnro%2B3VA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to