This is my new task where i have to configure haproxy load balancer on top of amazon cloud. For this we have to register our backend and our backend is nothing its just an our website. Scenario is like we have to do this with ansible and as soon as our load increase we launch another webserver but dynamically so we have to use dynamic inventory here.
So let’s get started .
This is my workspace
Here is my conf file
- First I create 3 instances one for load balancer and two where are website is running.
After launching of instances we configure load balancer on lb_os and web server on web instance.
This is my haproxy tasks file
Now i have to configure the web server.
This is my setup file that runs my role
Now from above figure you can see we balance the load successfully.
#keepcoding #keepshaing #makinindiafutureready #devops #ansible #aws