This section describes the steps to publish Ansible collection with ansible.cfg
file via Ansible client CLI.
To locate publish collections 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 in ansible.cfg file to your ansible client.
Note
You must configure
ansible.cfg
file in your workspace to use Server in ansible.cfg file approach. To learn how to configure, refer to the Configure Ansible Client to Work with Collections using ansible.cfg File section.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 placeholder in bold with the path to your archive.
ansible-galaxy collection publish <NAMESPACE.COLLECTION_NAME>
For example:
ansible-galaxy collection publish geerlingguy.k8s.tar.gz