Install Ansible Roles without the .netrc File using Server Explict

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

This topic describes how to install Ansible roles without .netrc file using Ansible client CLI by connecting directly to a Galaxy server by including a token when connecting to the Ansible LabKey server.

To install roles via CLI without using the .netrc file:

Run the following command:

ansible-galaxy role install <NAMESPACE.ROLE_NAME>.tar.gz -s https://[JFrogPlatformURL]/artifactory/api/ansible/<REPOSITORY_NAME> --token=<TOKEN>

Where:

  • <NAMESPACE.ROLE_NAME>: The namespace and role name

  • [JFrogPlatformURL]: The URL of your JPD

  • <REPOSITORY_NAME>: The name of the target repository

  • <TOKEN>: Your Artifactory identity token

For example:

ansible-galaxy role install geerlingguy.k8s.tar.gz -s https://company.jfrog.io/artifactory/api/ansible/ansible-virtual --token=w8RvZ3tGkP7sVbNfHjMqYxAcX2pLdE9jU1oI5uC6yFzTmK4rB0eSgWlQhOaD

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.