Configure Reverse
Proxy i.e. Haproxy and update it’s configuration via ansible

So, let’s begin

I have Configured Master Node as Controller node of Ansible, created ansible configuration file in the ansible workspace and specified my inventory path

🔹Inventory: A database containing the list of worker nodes or system upon which configuration has to be performed

🔹Check the connectivity to all the nodes using command

ansible all -m ping → this command goes to all the node and perform ping operation

let’s begin with configuring the target nodes as web servers:

Here, I have created a single playbook where I have created two different plays. One play is for configuring the target nodes as webservers and the second play is for configuring the localhost as the Haproxy server.

🔹playbook for configuring the target nodes as webservers:

🔹This playbook will :

  1. attach mount my RHEL8 dvd containing different software with the node
  2. 2.create BaseOS & AppStream Yum Repo
  3. Installs httpd package from the yum repo that we created
  4. copy the content inside root directory of apache-webserver (/var/www/html/)
  5. Start httpd services

🔹This playbook will :

  1. Installs the HAproxy package, used for load balancing purpose
  2. I have a pre-created configuration template in which I have used some of the Jinja2 programs in order to dynamically identify the IP of the backend servers, so this step will copy this template to the destination folder.

🔹Given is the image of the configuration file that i have copied to slave nodes using template module.

🔹Let’s run the playbook

🔹The load balancer has been configured successfully:




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Summary of what I learned from the Qiskit Developer exam: 1–1 Construct multi-qubit quantum…

Programming Languages are Tools, not Personality Traits

Designing your own layout using CSS

Possible deep officer join high.

Synchronization in Real Time Distributed Operating systems

Coding on your own? Visual Studio Code’s free Git tools are still a life-saver

FluentU Review: Is It Your Cup Of Tea?

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
Mukul Jeveriya

Mukul Jeveriya

More from Medium

Let’s Encrypt with Kubernetes. Free HTTPS for your websites hosted in Kubernetes

Ansible — JSON_QUERY Nested KeyValuePair

Jitsi Installation with JWT Support on Ubuntu 20.04 TLS

Launching and running Firefox i.e (GUI Application) on the top of docker container.