Configuring Apache webserver and Haproxy using ansible Roles

Hello everyone…
Here in this project we will configure the webserver and reverse proxy using apache Haproxy using ansible Roles and will also automatically update the configuration file of haproxy behind the scene.
To get more information regarding Apache webserver, Haproxy, ansible ,etc do read my below blog.It will give you more insights regarding this project.
“Configuring the reverse proxy for Apache webserver using Ansible” by Jyotisp
Ansible Roles:
Ansible role is a set of tasks to configure a host to serve a certain purpose like configuring a service. Roles are defined using YAML files with a predefined directory structure. A role directory structure contains directories: defaults, vars, tasks, files, templates, meta, handlers.
In Ansible, the role is the primary mechanism for breaking a playbook into multiple files. This simplifies writing complex playbooks, and it makes them easier to reuse. The breaking of playbook allows you to logically break the playbook into reusable components.
Each role is basically limited to a particular functionality or desired output, with all the necessary steps to provide that result either within that role itself or in other roles listed as dependencies.
So let’s start with our project:
This project aims at:
🔅Creating an ansible role myapache to configure Httpd WebServer.
🔅Creating another ansible role myloadbalancer to configure HAProxy LB.
🔅We need to combine both of these roles controlling webserver versions
and solving challenge for host ip’s addition dynamically over each Managed
Node in HAProxy.cfg file.
So , I have an ansible role for Apache webserver and haproxy

So, this creates two roles and here they are updating the configuration file of haproxy automatically when any new webserver gets configured behind the scene.
So, here the aim of project is fulfilled.
You can access these roles on ansible galaxy:
Apache webserver role:
https://galaxy.ansible.com/jyotisp/apache_ansible_roles
Apache Haproxy role:
https://galaxy.ansible.com/jyotisp/haproxy_ansible_role
I hope you all loved this project.
Do share with your friends…..
Thanks for reading in advance!!