Ansible Roles logo

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.

3 APIs 5 Features
AnsibleAutomationCollectionsConfiguration ManagementDevOpsInfrastructure As CodeRoles

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

Role Search and Discovery

Search Galaxy for community-contributed roles by keyword, author, namespace, or tag to find reusable automation content.

Collection Packaging

Bundle roles, modules, plugins, and documentation into distributable collection packages versioned and published via the Galaxy API.

Version Management

Access specific versions of roles and collections, enabling pinned dependency management in Ansible projects.

Certified Content

Access Red Hat-certified and partner-validated Ansible collections with enterprise-grade quality assurance via Automation Hub.

Namespace Management

Manage author namespaces on Galaxy to publish and maintain role and collection content under a consistent identity.

Use Cases

Role Reuse Across Projects

Discover and install community roles from Galaxy to avoid reinventing automation logic for common tasks like nginx, MySQL, or Kubernetes setup.

Certified Enterprise Automation

Use Red Hat-certified collections from Automation Hub in production environments where quality assurance and support are required.

Private Content Distribution

Publish internal roles and collections to a private Automation Hub instance for controlled distribution within an organization.

Dependency Management

Pin role and collection versions in requirements.yml files and install them via the Galaxy API in CI/CD pipelines.

Integrations

Ansible Playbooks

Use roles discovered via the Galaxy API directly in Ansible playbooks with the roles directive or include_role task.

Ansible Automation Platform

Synchronize collections from Galaxy or Automation Hub into Ansible Automation Platform for use in job templates.

Requirements Files

Define role and collection dependencies in requirements.yml and install them automatically via ansible-galaxy CLI using the API.

Semantic Vocabularies

Ansible Roles Context

4 classes · 16 properties

JSON-LD

Resources

🚀
GettingStarted
GettingStarted
🔑
Authentication
Authentication
📜
TermsOfService
TermsOfService
📜
PrivacyPolicy
PrivacyPolicy
👥
GitHubRepository
GitHubRepository
👥
GitHubOrganization
GitHubOrganization
🔗
Role Schema
JSONSchema
🔗
Collection Schema
JSONSchema
🔗
Vocabulary
Vocabulary