Search

Chapter 2. Configuring Ansible automation hub remote repositories to sync content

download PDF

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

  1. Log in to console.redhat.com as an organization administrator.
  2. Navigate to Automation Hub Repo Management.
  3. Locate the Sync URL and click the Copy to clipboard icon ( Copy ). Paste the Sync URL in a file to use when configuring the rh-certified remote.
  4. Click the More actions icon More and click Get token.
  5. On the Token management page, click Load token.
  6. Click Copy to clipboard to copy the API token.
  7. 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

  1. Log in to your private automation hub.
  2. Navigate to Repo Management.
  3. Click the Remotes tab.
  4. In the rh-certified remote repository, click More and click Edit.
  5. In the modal, paste the Sync URL and Token you acquired from console.redhat.com.
  6. 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.

  7. 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

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

Procedure

  1. Log in to your Ansible automation hub.
  2. Navigate to Repo Management.
  3. Click the Remotes tab.
  4. In the Community remote, click the More Actions icon More and click Edit.
  5. In the modal, click Browse and locate the requirements.yml file on your local machine.
  6. 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.

  7. 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.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.