Ansible Roles
A curated collection of APIs and resources for discovering, managing, and consuming Ansible roles — the primary unit of reusable automation content in the Ansible ecosystem. Covers the Galaxy and Automation Hub APIs for role discovery, download, and publishing, as well as the Ansible Collections framework that has extended the role model into full-featured content packages.
APIs
Ansible Galaxy Roles API
The Ansible Galaxy v1 and v2 REST API enables searching, discovering, and downloading Ansible roles contributed by the community. Supports searching roles by keyword, author, or...
Ansible Galaxy Collections API
The Ansible Galaxy v3 API provides enhanced support for Ansible collections — the modern packaging format that bundles roles, modules, plugins, and documentation together. Suppo...
Ansible Automation Hub Roles API
The Red Hat Ansible Automation Hub provides certified and partner-validated Ansible collections and roles for enterprise use. The API enables access to Red Hat-certified content...
Features
Search Galaxy for community-contributed roles by keyword, author, namespace, or tag to find reusable automation content.
Bundle roles, modules, plugins, and documentation into distributable collection packages versioned and published via the Galaxy API.
Access specific versions of roles and collections, enabling pinned dependency management in Ansible projects.
Access Red Hat-certified and partner-validated Ansible collections with enterprise-grade quality assurance via Automation Hub.
Manage author namespaces on Galaxy to publish and maintain role and collection content under a consistent identity.
Use Cases
Discover and install community roles from Galaxy to avoid reinventing automation logic for common tasks like nginx, MySQL, or Kubernetes setup.
Use Red Hat-certified collections from Automation Hub in production environments where quality assurance and support are required.
Publish internal roles and collections to a private Automation Hub instance for controlled distribution within an organization.
Pin role and collection versions in requirements.yml files and install them via the Galaxy API in CI/CD pipelines.
Integrations
Use roles discovered via the Galaxy API directly in Ansible playbooks with the roles directive or include_role task.
Synchronize collections from Galaxy or Automation Hub into Ansible Automation Platform for use in job templates.
Define role and collection dependencies in requirements.yml and install them automatically via ansible-galaxy CLI using the API.