Surprising !
There is still better way available to do code deploy using Ansible ..

Task should looks like

1) remove webserver from lb - use module haproxy (wait till connection drain)
2) silent monitoring for web health check - use nagios/zabbix or any another 
monitoring module 
3) deploy code
4) do manual web health check or use nagios socket
5) add back in lb 
6) unshut web health check in monitoring

If step 4 fails revert to previous version of deployment and continue the steps 
5 and 6

We had the multi dc and multi env setup where 5 dc and 3 env used 

For that we have used group_vars to keep all our dc specific folders and the 
env as yml var file, just to use the extra-vars dc=cool env=prod solved the 
issues.
In these env var files we have added all our info, just like if we have prod 
env running at cool dc 

lb: lbserver
web: "web1, web2"
watchdog: nagioserver

In task header just to add the following and each task delegate to the 
addressed server. 

host:{{target}}
var_files: {{dc}}

cmd: 
ansible-playbook deploy.yml -e "dc=colo env=prod"

-- 
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/313e3a70-dc68-41d7-b516-91f2b4cfd7be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to