ARTH — Task 15 👨🏻‍💻

Role for Configuring HTTPD

Role: 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.

# ansible-galaxy role init my_http_role
# ansible-galaxy role list

🌟Now run main yml file http_role.yml :

Ansible role myloadbalancer to configure HAProxy LB.


Roles let you automatically load related vars_files, tasks, handlers, and other Ansible artifacts based on a known file structure. Once you group your content in roles, you can easily reuse them and share them with other users

🌟Controller Node🌟 in this controller node we will config our Loadbalancer.

🌟Managed Node🌟 this managed node is our backed webserver .

# ansible-galaxy role init haproxy_role
# ansible-galaxy role init
# ansible-galaxy role list
# ansible-playbook haproxy_role.yml
systemctl status httpd



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