Chapter 2. Configuring Ansible automation hub remote repositories to sync content
You can configure your private automation hub to synchronize with Ansible Certified Content Collections hosted in your organization repository on console.redhat.com
or to your choice of collections in Ansible Galaxy.
2.1. Reasons to configure remote repositories
By configuring remote repositories, you can set your private automation hub to synchronize Red Hat Certified Collections hosted in your organization’s repository on console.redhat.com
and your choice of collections in Ansible Galaxy.
Each remote repository located in
2.2. Retrieving the Sync URL and API token for your Red Hat Certified Collection
You can synchronize Ansible Certified Content Collections curated by your organization from console.redhat.com
to your private automation hub.
Prerequisites
- You have organization administrator permissions to create the synclist on console.redhat.com.
Procedure
-
Log in to
console.redhat.com
as an organization administrator. -
Navigate to
. -
Locate the Sync URL and click the icon (
). Paste the Sync URL in a file to use when configuring the rh-certified remote.
-
Click the
and click .
icon
- On the Token management page, click .
- Click 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-certified remote repository and synchronizing Red Hat Ansible Certified Content Collection.
You can edit the rh-certified remote repository to synchronize collections from automation hub hosted on console.redhat.com to your private automation hub. By default, your private automation hub rh-certified
repository includes the URL for the entire group of Ansible Certified Content Collections. To use only those collections specified by your organization, you must include a unique URL.
Prerequisites
- You have valid 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 console.redhat.com.
- You have configured access to port 443. This is required for synchronizing certified collections. For more information, see the automation hub table in the Network ports and protocols chapter of the Red Hat Ansible Automation Platform Planning Guide.
Procedure
- Log in to your private automation hub.
- Navigate to .
- Click the Remotes tab.
-
In the rh-certified remote repository, click
and click .
- In the modal, paste the Sync URL and Token you acquired from console.redhat.com.
Click
.The modal closes and returns you to the Repo Management page. You can now synchronize collections between your organization synclist on console.redhat.com and your private automation hub.
- Click to synchronize collections.
The Sync status notification updates to notify you of completion of the Red Hat Certified Content Collections synchronization.
Verification
- Select Red Hat Certified from the collections content drop-down list to confirm that your collections content has synchronized successfully.
2.4. Configuring the community remote repository and syncing Ansible Galaxy collections
You can edit the community remote repository to synchronize chosen collections from Ansible Galaxy to your private automation hub. By default, your private automation hub community repository directs to 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 synchronize from Ansible Galaxy as in the following example:
Requirements.yml example
collections: # Install a collection from {Galaxy}. - name: community.aws version: 5.2.0 source: https://galaxy.ansible.com
collections:
# Install a collection from {Galaxy}.
- name: community.aws
version: 5.2.0
source: https://galaxy.ansible.com
Procedure
- Log in to your Ansible automation hub.
- Navigate to .
- Click the Remotes tab.
-
In the Community remote, click the icon
and click .
-
In the modal, click
requirements.yml
file on your local machine. and locate the Click
.The modal closes and returns you to the Repo Management page. You can now synchronize collections identified in your
requirements.yml
file from Ansible Galaxy to your private automation hub.- Click to sync collections from Ansible Galaxy and Ansible automation hub.
The Sync status notification updates to notify you of completion or failure of Ansible Galaxy collections synchronization to your Ansible automation hub.
Verification
- Select Community from the collections content drop-down list to confirm successful synchronization.