Sync content collections

You can sync certified and validated collections in Ansible Automation Platform from console.redhat.com.

Before you begin

  • You have a valid Ansible Automation Platform subscription.
  • You have organization administrator permissions for console.redhat.com.
  • You have created a requirements file.
  • The following domain names are part of either the firewall or the proxy’s allowlist. They are required for successful connection and download of collections from automation hub or Galaxy server:
    • sso.redhat.com
    • console.redhat.com
    • automation-hub-prd.s3.us-east-2.amazonaws.com
    • galaxy.ansible.com
    • ansible-galaxy-ng.s3.dualstack.us-east-1.amazonaws.com
  • SSL inspection is disabled either when using self signed certificates or for the Red Hat domains.
Important:

Before you begin your content sync, ensure that you have the resources to sync the collections you need.

About this task

Note:

When syncing content, keep in mind that automation hub does not check other repositories for dependencies. To avoid an error, turn off dependency downloading by editing your remote settings.

Procedure

  1. From the navigation panel, select Automation Content > Remotes.
  2. Find the remote you want to sync from and click the pencil icon Edit to edit.
  3. Find the field labeled Requirements file. There, you can either paste the contents of your requirements file, or upload the file from your hard drive by selecting the upload button.
  4. Click Save remote.
  5. To begin synchronization, from the navigation panel select Automation Content > Repositories.
  6. In the row containing the repository you want to sync, click the ⋮ icon and select the Sync repositorySync repository icon to initiate the remote repository synchronization to your private automation hub.
  7. On the modal that appears, you can toggle the following options:
    • Mirror: Select if you want your repository content to mirror the remote repository’s content.
    • Optimize: Select if you want to sync only when changes are reported by the remote server.
  8. Click Sync to complete the sync.

Results

After you initiate a sync, the Sync status column on the Automation Content > Repositories page updates to show the current state of the operation.
Sync status Description
Completed The sync finished successfully. The repository content is up to date with the remote.
Failed The sync encountered an error. Check the sync task details for more information.
Syncing The sync is in progress.
No sync The repository has never been synced.

To verify the sync results, navigate to Automation Content > Collections and confirm that the expected content appears.

Check when a repository was last synced

The Automation Content > Remotes page shows the "Last updated" timestamp for each remote configuration. The timestamp also reflects the most recent successful sync for that remote. You can also retrieve the last sync time from the API. Send a GET request to /api/galaxy/pulp/api/v3/repositories/ansible/ansible/ and check the last_synced_metadata_time field in the response. The field is null if the repository has never been synced.