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 console.redhat.com or to your choice of collections in Ansible Galaxy.
2.1. About remote repositories Copy linkLink copied to clipboard!
You can configure your local automation hub to sync with Red Hat Certified Collections hosted in your organization repository on console.redhat.com and to your choice of collections in Ansible Galaxy by configuring remote repositories.
Each remote repository located in
2.2. Retrieving your Red Hat Certified Collections Sync URL and API token. Copy linkLink copied to clipboard!
You can sync Red Hat certified collections curated by your organization from console.redhat.com to your local automation hub.
Prerequisites
- You have Organization Administrator permissions for 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 icon (
) and click .
- 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. Copy linkLink copied to clipboard!
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 use only those collections specified by your organization, you must 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 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 local automation hub.
- Navigate to .
- Click the Remotes tab.
-
In the rh-certified remote, click
and click .
- In the modal, paste the Sync URL and Token you acquired from cloud.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 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 Copy linkLink copied to clipboard!
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.ymlfile 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
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 .
- Click the Remotes tab.
-
In the community remote, click the icon
and click .
-
In the modal, click and locate the
requirements.ymlfile on your local machine. - Click .
The modal closes and returns 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 to sync collections from Ansible Galaxy and automation hub.
The Sync status notification updates 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.