create registry ansible-galaxy
  • 05 Jun 2025
  • Dark
    Light
  • PDF

create registry ansible-galaxy

  • Dark
    Light
  • PDF

Article summary

iagctl create registry ansible-galaxy

Create a new ansible-galaxy registry

Synopsis

This command creates an Ansible Galaxy registry reference in your gateway's data store. IAG supports creating registries that point to any Galaxy registry for use with your Ansible services.

By default, Gateway includes an Ansible Galaxy registry reference called default-galaxy that points to the public Galaxy registry at https://galaxy.ansible.com. You can set a new default registry by specifying the --default flag.

You can specify the URL of the registry you want to create using the --url flag. You can find the URL of the registry you want to use from your Ansible Galaxy instance's UI under Collections > Repository Management.

You can use several flags to specify the type of authentication required to access the registry. By default, IAG uses no authentication.

Use the --username and --password-name flags to specify basic authentication. Use the --token-name flag to specify token authentication. The --password-name and --token-name flags reference the names of secret resources that contain the actual password or token value. See the 'Handle secret values' section displayed when you run iagctl create registry -h for more information about using secrets with registries.

To ignore SSL certificate verification, specify the --insecure flag. This sets the ANSIBLE_GALAXY_SERVER_<REGISTRY_NAME>_VALIDATE_CERTS environment variable to False during dependency installation.

To specify the URL of a Keycloak server for SSO authentication, use the --auth-url flag. You can specify the client ID of that server using the --client-id flag.

iagctl create registry ansible-galaxy <name> --url <string> [flags]

Examples

Create an Ansible Galaxy registry that requires basic authentication

The following example creates a registry called my-galaxy-registry that requires a username and password to authenticate. The username is admin and the password references a secret called galaxy_password.

iagctl create registry ansible-galaxy my-galaxy-registry \
--url 'http://private-repo-hostname' \
--username admin \
--password-name galaxy_password

Create an Ansible Galaxy registry that requires token authentication

The following example creates a registry called my-galaxy-registry that requires a token to authenticate. The token value references a secret called galaxy_token.

iagctl create registry ansible-galaxy my-galaxy-registry \
--url 'http://private-repo-hostname' \
--token-name galaxy_token

Options

      --auth-url string        The URL of a Keycloak server 'token_endpoint' if using SSO authentication.
                               Mutually exclusive with username. Requires token
      --client-id string       The Keycloak token's client_id to use for authentication. Requires auth_url
                               and token
      --default                Whether or not this registry will be used by default if no registry is specified
                               on a service. Only one default can exist at a time.
      --description string     A brief description of the registry
  -h, --help                   help for ansible-galaxy
      --insecure               Whether or not to verify TLS certificates and treat this registry as a trusted
                               host
      --password-name string   The password for the registry referenced by the name of a secret in the secret
                               store
      --tag stringArray        Metadata tag(s) to associate with the service
      --token-name string      The token for the registry referenced by the name of a secret in the secret
                               store
      --url string             The url of the registry
      --username string        The username for the registry

Options inherited from parent commands

      --config string   Path to the configuration file
      --raw             Displays the result of the command in its raw format
      --verbose         Enable verbose output

Learn more


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.