1.

What are Ansible roles and their purpose?

Answer»

Role is a group of variables, tasks, files, and handlers that store in the standardized file structure. Roles facilitate REUSE and modularization of configuration. For exp: 2 roles have been written, 1 for Apache HTTP and the second one for Apache Tomcat. Now if you need to configure HTTP and Tomcat both on a server than you can just include both roles in the playbook or if you need only one from it then include only 1 role in the playbook. In this way, there is no need for major changes in playbook other than modification of role name, thus PROVIDE reusability and modularity.  So, the role is in simple words are SMALL blocks, which can be used as PER requirement anywhere to build a big or small WALL.



Discussion

No Comment Found