Configure the Ansible Client to work with Collections

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

To configure the Ansible client to work with Collections, update the ansible.cfg file with the below snippet.

Once the snippet has been added to the ansible.cfg file and saved down, when using your Ansible client you will be directed to the Artifactory instance who will then proxy all requests to Ansible.

The sample ansible.cfg snippet which should be added to the ansible.cfg file is as follows:

[galaxy]
server_list = <REPOSITORY_NAME>

[galaxy_server.<REPOSITORY_NAME>]
url=https://<SERVER_NAME>/artifactory/api/ansible/<REPOSITORY_NAME>
token=<TOKEN>

Where:

  • <REPOSITORY_NAME>: Name of the repository/repository key.

  • <SERVER_NAME>: URL of your Jfrog instance (AKA JPD).

  • <TOKEN>: Your JPD access token

For example:

[galaxy]
server_list = ansible-virtual

[galaxy_server.ansible-virtual]
url=https://my-awesome.jfrog.io/artifactory/api/ansible/ansible-virtual
token=<TOKEN>

The server_list parameter can include multiple repositories separated by a comma.

For example: server_list = ansible-virtual, ansible-local

Alternatively, you can choose to use the Artifactory <URL> and <Token> explicitly in your Publish and Install commands.

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.

Next Steps: