Configuring haproxy and webserver using roles in Ansible

What are roles?

  • Roles group content, allowing easy sharing of code with others
  • Roles can be written that define the essential elements of a system type: web server, database server, Git repository, or other purpose
  • Roles make larger projects more manageable
  • Roles can be developed in parallel by different administrators in addition to writing, using, reusing, and sharing your own roles, we can get roles from other sources. Some roles are included as part of Red Hat Enterprise Linux, in the rhel-system-roles package. We can also get numerous community-supported roles from the Ansible Galaxy website and also share our own created roles there.

Setting up the apache server

Configuring the haproxy

Creating the main playbook

Conclusion

--

--

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