Managing Red Hat Certified and Ansible Galaxy collections in Automation Hub

Red Hat Ansible Automation Platform 1.2

Configure Automation Hub to deliver curated Red Hat Certified and Ansible Galaxy collections content to your users.

Red Hat Customer Content Services

Abstract

Providing Feedback:
If you have a suggestion to improve this documentation, or find an error, create an issue at http://issues.redhat.com. Select the Automation Hub (AAH) project and use the Documentation component.

Preface

You can sync Automation Hub to use the Red Hat Certified Collections available through your Ansible Automation Platform subscription or community collections available through Ansible Galaxy.

Your organization can access and curate into a unique set of collections from all Red Hat Certified content in the Automation Hub service hosted on cloud.redhat.com.

Chapter 1. Managing Red Hat Certified collections synclists in Automation Hub

You can use Automation Hub to distribute the relevant Red Hat Certified collections content to your users by creating synclists.

1.1. About Red Hat Certified collections synclists

A synclist is a curated group of Red Hat Certified collections that is assembled by your Organization Administrator that syncs to your local Automation Hub. Use synclists to manage only the content that you want and exclude unnecessary collections. You can design and manage your synclist from the content available as part of Red Hat Certified collections on cloud.redhat.com

Each synclist has its own unique repository URL you can use to designate as a remote source for content in Automation Hub and is securely accessed using an API token.

1.2. Creating a synclist of Red Hat Certified collections

You can create a synclist of curated Red Hat Certified collections in Automation Hub on cloud.redhat.com. Your synclist repository is located under menu[Automation Hub > Repo Management], which is updated whenever you choose to manage content within Red Hat Certified collections.

By default, all Red Hat Certified collections are included in your initial organization synclist.

Prerequisites

  • You have a valid Ansible Automation Platform subscription.
  • You have Organization Administrator permissions for cloud.redhat.com.

Procedure

  1. Log in to cloud.redhat.com.
  2. Navigate to Automation HubCollections.
  3. Use the toggle switch on each collection to determine whether to exclude it from your synclist.

When you finish managing collections for your synclist, you can navigate to Automation HubRepo Management to initiate the remote repository sync to your local Automation Hub. If your remote repository is already configured, you can manually sync Red Hat Certified collections to your local Automation Hub to update the collections content that you made available to local users.

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 cloud.redhat.com or to your choice of collections in Ansible Galaxy.

2.1. About remote repositories

You can configure your local Automation Hub to sync with Red Hat Certified Collections hosted in your organization repository on cloud.redhat.com and to your choice of collections in Ansible Galaxy by configuring remote repositories.

Each remote repository located in menu[Repo Management > Remote] provides information for both community and rh-certified about when the repo was last updated and when content was last synced. You can add new content to Automation Hub at any time using the Edit and Sync features included on the Repo ManagementRemote page.

2.2. Retrieving your Red Hat Certified Collections Sync URL and API token.

You can sync Red Hat certified collections curated by your organization from cloud.redhat.com to your local Automation Hub.

Prerequisites

  • You have Organization Administrator permissions for cloud.redhat.com.

Procedure

  1. Log in to cloud.redhat.com as an Organization Administrator.
  2. Navigate to Automation HubRepo Management.
  3. Locate the Sync URL and click Copy to clipboard . Paste the Sync URL in a file to use when configuring the rh-certified remote.
  4. Click More actions 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-cerftified remote repository and syncing Red Hat Certified collections.

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 only use those collections specified by your organization, you need to 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 cloud.redhat.com.

Procedure

  1. Log in to your local Automation Hub.
  2. Navigate to Repo Management.
  3. Click the Remotes tab.
  4. In the rh-certified remote, click More actions and click Edit.
  5. In the modal, paste the Sync URL and Token you acquired from cloud.redhat.com.
  6. Click Save.

The modal will close and return you to the Repo Management page. You can now sync collections between your organization synclist on cloud.redhat.com and your local Automation Hub.

  1. Click Sync to sync collections.

The Sync status notification will update 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.

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/v2/collections.

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

Procedure

  1. Log in to your local Automation Hub.
  2. Navigate to Repo Management.
  3. Click the Remotes tab.
  4. In the community remote, click More actions and click Edit.
  5. In the modal, click Browse and locate the requirements.yml file on your local machine.
  6. Click Save.

The modal will close and return 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.

  1. Click Sync to sync collections from Ansible Galaxy and Automation Hub.

The Sync status notification will update 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.

Chapter 3. Conclusion

Upon completing the above procedures, you will have created a synclist for Red Hat Certified collections content, synced that content to your local Automation Hub, and designated community collections from Ansible Galaxy to distribute to your users.

Users can now view and download collections content from your local Automation Hub.

Legal Notice

Copyright © 2021 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.