Role structure
Roles have a structured layout on the filesystem. This structure exists to provide automation around including tasks, handlers, variables, modules, and role dependencies. The structure also allows for the easy reference of files and templates from anywhere within the role.
Roles all live in a subdirectory of a playbook directory structure in the roles/ directory. This is, of course, configurable by way of the roles_path general configuration key, but let's stick to the defaults. Each role is itself a directory tree. The role name is the directory name within roles/. Each role can have a number of subdirectories with special meanings that are processed when a role is applied to a set of hosts.
A role may contain all these elements, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access