Managing Red Hat Certified and Ansible Galaxy collections in Automation Hub
Configure Automation Hub to deliver curated Red Hat Certified and Ansible Galaxy collections content to your users.
Abstract
Preface
You can sync Automation Hub to use the Red Hat Certified Collections available through your Ansible Automation Platform subscription or community collections available through Ansible Galaxy.
Your organization can access and curate into a unique set of collections from all Red Hat Certified content in the Automation Hub service hosted on cloud.redhat.com.
Chapter 1. Managing Red Hat Certified collections synclists in Automation Hub
You can use Automation Hub to distribute the relevant Red Hat Certified collections content to your users by creating synclists.
1.1. About Red Hat Certified collections synclists
A synclist is a curated group of Red Hat Certified collections that is assembled by your Organization Administrator that syncs to your local Automation Hub. Use synclists to manage only the content that you want and exclude unnecessary collections. You can design and manage your synclist from the content available as part of Red Hat Certified collections on cloud.redhat.com
Each synclist has its own unique repository URL you can use to designate as a remote source for content in Automation Hub and is securely accessed using an API token.
1.2. Creating a synclist of Red Hat Certified collections
You can create a synclist of curated Red Hat Certified collections in Automation Hub on cloud.redhat.com. Your synclist repository is located under menu[Automation Hub > Repo Management], which is updated whenever you choose to manage content within Red Hat Certified collections.
By default, all Red Hat Certified collections are included in your initial organization synclist.
Prerequisites
- You have a valid Ansible Automation Platform subscription.
- You have Organization Administrator permissions for cloud.redhat.com.
Procedure
- Log in to cloud.redhat.com.
- Navigate to Automation Hub → Collections.
- Use the toggle switch on each collection to determine whether to exclude it from your synclist.
When you finish managing collections for your synclist, you can navigate to Automation Hub → Repo Management to initiate the remote repository sync to your local Automation Hub. If your remote repository is already configured, you can manually sync Red Hat Certified collections to your local Automation Hub to update the collections content that you made available to local users.
Chapter 2. Configuring Automation Hub remote repositories to sync content from Red Hat Certified and Ansible Galaxy collections
You can configure your local Automation Hub to sync with Red Hat Certified Collections hosted in your organization repository on cloud.redhat.com or to your choice of collections in Ansible Galaxy.
2.1. About remote repositories
You can configure your local Automation Hub to sync with Red Hat Certified Collections hosted in your organization repository on cloud.redhat.com and to your choice of collections in Ansible Galaxy by configuring remote repositories.
Each remote repository located in menu[Repo Management > Remote] provides information for both community and rh-certified about when the repo was last updated and when content was last synced. You can add new content to Automation Hub at any time using the Edit and Sync features included on the Repo Management → Remote page.
2.2. Retrieving your Red Hat Certified Collections Sync URL and API token.
You can sync Red Hat certified collections curated by your organization from cloud.redhat.com to your local Automation Hub.
Prerequisites
- You have Organization Administrator permissions for cloud.redhat.com.
Procedure
- Log in to cloud.redhat.com as an Organization Administrator.
- Navigate to Automation Hub → Repo Management.
-
Locate the Sync URL and click
. Paste the Sync URL in a file to use when configuring the rh-certified remote.
-
Click
and click Get token.
- On the Token management page, click Load token.
- Click Copy to clipboard to copy the API token.
- Paste the API token into a file and store in a secure location.
The API token is a secret token used to protect your content. Store your API token in a secure location.
2.3. Configuring the rh-cerftified remote repository and syncing Red Hat Certified collections.
You can edit the rh-certified remote repository to sync collections from Automation Hub hosted on cloud.redhat.com to your local Automation Hub. By default, your local Automation Hub rh-certified
repository includes the URL for the entire group of Red Hat Certified Collections available on cloud.redhat.com. To only use those collections specified by your organization, you need to include a unique URL.
Prerequisites
- You have Modify Ansible repo content permissions. See Managing user access in Automation Hub for more information on permissions.
- You have retrieved the Sync URL and API Token from the Automation Hub hosted service on cloud.redhat.com.
Procedure
- Log in to your local Automation Hub.
- Navigate to Repo Management.
- Click the Remotes tab.
-
In the rh-certified remote, click
and click Edit.
- In the modal, paste the Sync URL and Token you acquired from cloud.redhat.com.
- Click Save.
The modal will close and return you to the Repo Management page. You can now sync collections between your organization synclist on cloud.redhat.com and your local Automation Hub.
- Click Sync to sync collections.
The Sync status notification will update to notify you of completion of Red Hat Certified collections sync.
Verification
You can confirm that your collections content has synced successfully by selecting Red Hat Certified from the collections content drop-down list.
2.4. Configuring the community remote repository and syncing Ansible Galaxy collections
You can edit the community remote repository to sync chosen collections from Ansible Galaxy to your local Automation Hub. By default, your local Automation Hub community
repository directs to https://galaxy.ansible.com/api/
.
Prerequisites
- You have Modify Ansible repo content permissions. See Managing user access in Automation Hub for more information on permissions.
-
You have a
requirements.yml
file that identifies those collections to sync from Ansible Galaxy. See example below.
Requirements.yml example
collections: # Install a collection from Ansible Galaxy. - name: geerlingguy.php_roles version: 0.9.3 source: https://galaxy.ansible.com
Procedure
- Log in to your local Automation Hub.
- Navigate to Repo Management.
- Click the Remotes tab.
-
In the community remote, click
and click Edit.
-
In the modal, click Browse and locate the
requirements.yml
file on your local machine. - Click Save.
The modal will close and return you to the Repo Management page. You can now sync collections identified in your requirements.yml
file from Ansible Galaxy to your local Automation Hub.
- Click Sync to sync collections from Ansible Galaxy and Automation Hub.
The Sync status notification will update to notify you of completion or failure of Ansible Galaxy collections sync to your Automation Hub.
Verification
You can confirm successful sync by selecting Community from the collections content drop-down list.
Chapter 3. Conclusion
Upon completing the above procedures, you will have created a synclist for Red Hat Certified collections content, synced that content to your local Automation Hub, and designated community collections from Ansible Galaxy to distribute to your users.
Users can now view and download collections content from your local Automation Hub.