✍CONFIGURE REVERSE PROXY USING ANSIBLE PLAYBOOK :

HELLO EVERYONE✌✌,

In this article, I will demonstrate How we can configure reverse proxy using ansible playbook.

✍TASK DESCRIPTION :

We can configure reverse proxy using ANSIBLE PLAYBOOK!

  1. Update its Configuration file automatically on its each managed node.
  2. And also configure apache webserver and join the inventory.

✍What is Ansible ?

Ansible is an open-source IT automation engine, which can remove drudgery from your work life, and will also dramatically improve the scalability, consistency, and reliability of your IT environment.

ANSIBLE

✍What is Ansible and what can it automate?

You can use Ansible to automate three types of tasks:

👉Provisioning: Set up the various servers you need in your infrastructure.

✍Why we need Ansible?

There are many other IT automation tools available, including more mature ones like Puppet and Chef, so why would you choose Ansible? The main reason is simplicity.

✍WHAT IS AN ANSIBLE-PLAYBOOK ?

An Ansible playbook is an organized unit of scripts that defines work for a server configuration managed by the automation tool Ansible. Ansible is a configuration management tool that automates the configuration of multiple servers by the use of Ansible playbooks. It is written in YAML language.

✍What is Load Balancer ?

Load balancing is defined as the methodical and efficient distribution of network or application traffic across multiple servers in a server farm. Each load balancer sits between client devices and backend servers, receiving and then distributing incoming requests to any available server capable of fulfilling them.

LOADBALANCER

✍What is HaProxy Load Balancer ?

HaProxy (High Availability Proxy) is a TCP/HTTP load balancer and proxy server that allows a webserver to spread incoming requests across multiple endpoints.

✍ WHAT IS WEBSERVER ?

A web server is a computer that runs websites. It’s a computer program that distributes web pages as they are requisitioned. The basic objective of the web server is to store, process and deliver web pages to the users. This intercommunication is done using Hypertext Transfer Protocol (HTTP).

👉TO CONFIGURE ANSIBLE IN OUR OS :

In this task , first we have to install Ansible using this command

# pip3 install ansible

# ansible — version

# vim ip.txt

My Load Balancer is setup in IP 192.168.1.5

# vim /etc/ansible/ansible.cfg

# mkdir task12

# cd /task12

✍ To Writing the Ansible-playbook for Haproxy load balancer :

We have to run following commands which is given below :-

# cd /etc/haproxy/

# ls

# vim haproxy.cfg

👉NEXT :

👉NEXT :

# vim lb.yml

After writing the code we will check the syntax of our code and it will not show any error if its correct.

# ansible-playbook — syntax-check lb.yml

👉 NEXT :

# ansible-playbook lb.yml

👉 NEXT :

👉 NEXT :

👉 LOAD BALANCER AFTER IT’S CONFIGURATION :

# systemctl status haproxy

👉HAPROXY AFTER IT’S CONFIGURATION :

# vim /etc/haproxy/haproxy.cfg

👉FOR TARGET NODE 1 :

# rpm -q httpd

# systemctl status httpd

# netstat -tnlp | grep httpd

👉 NEXT :

Webserver after configuration :

👉 NEXT :

👉SAME FOR TARGET NODE 2 :

THANK YOU🙏🙏 GUYS FOR READING MY BLOG…

KEEP LEARNING🙇‍♂️📖🙇….

KEEP SHARING✌✌….

ARTH-LEARNER || IIEC RISE || FLUTTER || PYTHON || REDHAT || DOCKERS || AI || BIG DATA || HADOOP || ANSIBLE || KUBERNETES || ML || DL || JENKINS || OPENSHIFT ||

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store