create registry ansible-galaxy
Create a new ansible-galaxy registry
Synopsis
Create
This command will create an Ansible Galaxy registry reference in torero's data store. torero supports creating registries that point to any Galaxy registry for use with your Ansible services.
By default, torero will have a single Ansible Galaxy registry reference called
default-galaxy
that points to the public Galaxy registry located at https://galaxy.ansible.com
.
A new default registry can be set by specifying the --default
flag.
We can specify the URL of the registry we want to create using the --url
flag. You can get the
URL of the registry you want to use from your Ansible Galaxy instance's UI under:
Collections > Repository Management.
Many flags are available to specify the type of authentication required to access the registry. By default, no authentication used by torero.
The --username
and --password-name
flags can be used to specify basic authentication.
The --token-name
flag can be used to specify token authentication. The --password-name
and
--token-name
flags are references to the names of secret resources that contain the actual
password or token value. See the 'Handling Secret Values' section displayed when
torero create registry -h
is run for more information on using secrets with
registries.
To ignore SSL certificate verification, specify the --insecure
flag. This causes the
ANSIBLE_GALAXY_SERVER_<REGISTRY_NAME>_VALIDATE_CERTS
environment variable to be set to
False
during dependency
installation.
To specify the URL of a Keycloak server for SSO authentication, set the --auth-url
flag.
The client ID of that server can be specified using the --client-id
flag.
torero create registry ansible-galaxy <name> --url <string> [flags]
Examples
Create An Ansible Galaxy Registry That Requires Basic Authentication
Creates a registry called my-galaxy-registry
that requires a username and password to
authenticate. The username is admin
and the password is a reference to a secret
called galaxy_password
.
>_ torero 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
Creates a registry called my-galaxy-registry
that requires a token authenticate.
The token value is a reference to a secret called galaxy_token
.
>_ torero 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
SEE ALSO
- torero create registry - Create a new dependency management registry