Hi,
I’m deploying my web app using an ansible playbook (Apache+Tomcat+Grails stack).
It’s a web app with serveral frontend web servers, those fronts are behind several Amazons ELBs.
Using Ansibles ec2_facts I get the list of ELBs each machine is present in, then I get it out from those ELBs, deploy the new version, do some other things and bring it back to the ELB.
The problem I’m having is that if the deployment fails while the server is out of the ELB then when I retry to deploy Ansibles ec2_facts returns an empty list so that my server get out of the ELBs.
I asked on Ansibles support and Benno Joy (thanks again dude) suggested using local facts to store the ELB list.
By now I’m working on passing the ELB list as a variable to the playbook so that it’s durable but it forces me to update that list every time I add or delete an ELB.
I’d like other approaches to this problem if any of you has faced with it.
Thanks in advance.