Use Ansible playbook to Configure Reverse Proxy

 Today, We will configure reverse proxy server with ansible. In other words it is a system having load balancers and servers. 

We have mainly 3 parts in this architecture 

1. Controller Node

2. Load Balancers

3. Servers

We will update our inventory file. 

Here, Loadbalancer groups has all ips of load balancers and servers group has all servers ips.

Lets have a look at our playbook. 


After running this playbook.

Our Servers are started




Our Load Balancers config file.                                                                                                                                                                                                                                                                                                       

At last our service is running at port 8080 via load balancers.


Same setup with AWS

Here, first launch the instances. 

We have to login with .pem file from our ansible controller node. 
Key file must have read only permissions that are given by using command
chmod 400 file
Our inventory file


Here we have to use privilage escalation, ansible configuration file.

Our playbook



Running playbook with -become option.



Our page running on load balancer.


Thank You for reading.

I would like to thanks Vimal Daga Sir.

My Email — ayanchawlae@gmail.com











Comments

Popular posts from this blog

Key Announcements at Microsoft Ignite

Ansible Handlers

Ansible Roles (Httpd + Haproxy)