Package and reuse content with roles
An role is a portable, self-contained unit of automation that bundles tasks, variables, templates, and handlers. Roles allow you to organize and reuse automation content to fit specific system needs.
Instead of creating huge playbooks with hundreds of tasks, you can use roles to break the tasks apart into smaller, more discrete units of work.
Create a role Copy linkLink copied!
Create an Ansible role by using the ansible-galaxy CLI tool to build reusable automation components.
About this task Copy linkLink copied!
The Ansible Automation Platform bundle includes the Ansible Galaxy CLI tool. Access role-specific commands from the role subcommand:
ansible-galaxy role init <role_name>
Standalone roles outside of Collections are supported. Create new roles inside a Collection to take advantage of the features Ansible Automation Platform has to offer.