Chapter 4. Exporting and importing collections

Ansible automation hub stores collections within repositories. These collections are versioned by the curator, therefore, many versions of the same collection can exist in the same or different repositories at the same time.

Collections are stored as tar files that can be imported and exported. This ensures the collection you are importing to a new repository is the same one that was originally created and exported.

4.1. Export a collection

After collections are finalized, they can be delivered to new destinations and distributed to others users across your organization. Use the following procedure to export a collection.

Procedure

  1. Log in to Red Hat Ansible Automation Platform.
  2. Navigate to Automation HubCollections. The Collections page displays all of the collections across all of the repositories and allows you to search for a specific collection.
  3. Select the collection you want to export. The collection details page is displayed.
  4. From the Installation tab, select Download tarball. The tar file is downloaded to your default browser downloads folder and available to be imported to the location of your choosing.

4.2. Import a collection

To import a collection for use in a custom repository, it must be imported into your namespace and approved. If the collection is not approved, it is not displayed in the published repository.

Procedure

  1. Log in to Red Hat Ansible Automation Platform.
  2. Navigate to Automation HubNamespaces. The Namespaces page displays all of the namespaces available.
  3. Click View Collections.
  4. Click Upload Collection.
  5. Navigate to the collection tarball file, select the file and click Open.
  6. Click Upload.

    The My Imports screen provides a summary of tests and notifies you whether the collection uploaded successfully or failed.

    Note

    The collection must be approved before it can be added to your repository. See Approval pipeline for more information about collection and repository approvals.