Use Ansible playbook 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.
Load Balancer is a server which balances the load among the manage node servers , in this task i have configure the haproxy server on 2 manage node and we have 1 load balancer . If any user wanted to access the code he has to enter the IP of load balancer , and at that time load balancer will randomly go to any of the manage node and perform the task given by user . Load Balancer is very useful concept it provide security to our main servers . It reduces the lagg and load from any one server , almost every webserver uses this concept behind the seen .
1)Here we have haproxy.cfg , we need to update it .
2)here we update it .
3) here we have my.php file .
4)Here we have inventory file named ip.txt .
5) Here i have created a playbook name task12_1.yml in directory named /playbook .
6) Here is one of the managed node ip shown by the load balancer.
7)Here is second managed node ip shown by load balancer .