in Ansible by
Explain Ansible Roles

1 Answer

0 votes

Roles provide a framework for fully independent or interdependent collections of files, tasks, templates, variables, and modules.

The role is the primary mechanism for breaking a playbook into multiple files. This simplifies writing complex playbooks and makes them easier to reuse. The breaking of the playbook allows you to break the playbook into reusable components.

Each role is limited to a particular functionality or desired output, with all the necessary steps to provide that result either within the same role itself or in other roles listed as dependencies.

Related questions

+2 votes
0 votes
0 votes
asked Nov 5, 2019 in Ansible by Robin
0 votes
asked Feb 17, 2020 in Ansible by MBarbieri
0 votes
asked Oct 7, 2020 in Ansible by Robindeniel