This section describes the steps to publish collections via Ansible client CLI, without ansible.cfg File.
To locate publish code snippet based on your repository selection, follow these steps:
Click Application tab, and then click Artifacts under Artifactory.
Locate the repository you want to configure, and then click Set Me Up.
Note
Alternatively, you can also choose the repository from the Repository drop-down list under Set UP An Ansible Client modal.
Enter your JFrog account password to generate a token, and then click Generate Token & Create Instructions.
Click the Publish tab, copy and paste the snippet of Server explicit to your ansible client.
Replace the placeholder <NAMESPACE.COLLECTION_NAME> as appropriate, and then run the command.
The sample snippet structure is as follows:
Note
Make sure to replace the placeholders in bold with the namespace and collection name, server name, repository name, and token.
ansible-galaxy collection publish <NAMESPACE.COLLECTION_NAME> -s https://<SERVER_NAME>/artifactory/api/ansible/<REPOSITORY_NAME> --token=<TOKEN>
For example:
ansible-galaxy collection publish geerlingguy.k8s.tar.gz -s https://my-awesome.jfrog.io/artifactory/api/ansible/ansible-virtual --token=<TOKEN>