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 Repo Management Remote provides information for both the community and rh-certified repository about when the repository was last updated and when content was last synced . You can add new content to Ansible automation hub at any time using the Edit and Sync features included on the Repo Management Remote page. 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 Automation Hub Repo Management . Locate the Sync URL and click the Copy to clipboard icon ( ). Paste the Sync URL in a file to use when configuring the rh-certified remote. Click the More actions icon 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. Important 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 Repo Management . Click the Remotes tab. In the rh-certified remote repository, click and click Edit . In the modal, paste the Sync URL and Token you acquired from console.redhat.com. Click Save . 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 Sync 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 Procedure Log in to your Ansible automation hub. Navigate to Repo Management . Click the Remotes tab. In the Community remote, click the More Actions icon and click Edit . In the modal, click Browse and locate the requirements.yml file on your local machine. Click Save . 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 Sync 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.

Commands:
collections: # Install a collection from {Galaxy}. - name: community.aws version: 5.2.0 source: https://galaxy.ansible.com