Load Balancer Setup Configuration Using Ansible on AWS
Dec 16, 2020
🔰 TASK :
Use Ansible playbook in AWS to Configure Reverse Proxy i.e. Haproxy and update it’s configuration file automatically on each time new Managed node (Configured With Apache Webserver) join the inventory.
🔰 STEPS :
- Launch two instance over AWS cloud , then configure there ip in inventory as one for loadbalancer , one for webserver .
Configure the ansible config file.
2. Check the connectivity using
ansible all -m ping
command .
3. Then config haproxy config file using jinja keywords.
4. Now, create a playbook named web.yml
for webserver :
for loadbalancer :
Now, run the playbook .
5. Now to check the setup ->
In Loadbalancer :
In webserver:
Now , check webpage using loadbalancer ip:port no.