Install Ansible Collections via the CLI (Server Explicit)

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

This topic describes how to install Ansible collections using the Ansible client CLI. This bypasses the ansible.cfg file and allows you to connect to any Ansible repository.

To install Collections via CLI using the Server Explicit method:

Craft the CLI command using the below syntax. Make sure to replace the placeholders in bold with the namespace and collection name, server name, repository name, and token, then run the command.

ansible-galaxy collection install <NAMESPACE.COLLECTION_NAME>.tar.gz -s https://<SERVER_NAME>/artifactory/api/ansible/<REPOSITORY_NAME> --token=<TOKEN>

For example:

ansible-galaxy collection install geerlingguy.k8s.tar.gz -s https://my-awesome.jfrog.io/artifactory/api/ansible/ansible-virtual --token=<TOKEN>

Note: You can also use JFrog Set me up to copy the snippet populated with your token and environment. For more information see Use Artifactory Set Me Up for Configuring Package Manager Clients.