Artifactory supports the installation of roles resolved via remote repository.
For resolving roles via Artifactory, configure your Ansible registry credentials in your .netrc
file.
To locate configure 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 Configure tab, copy and paste the snippet of Roles to your
.netrc
file.
Note
To configure roles, you must add your credentials to the .netrc
file in addition to ansible.cfg
file. To learn how to configure ansible.cfg
, refer to Configure Ansible Client to Work with Collections using ansible.cfg File
Grant chmod 600 .netrc
priveleges.
The sample .netrc
snippet structure is as follows:
Note
Make sure to replace the placeholders in bold with your JFrog host domain and credentials.
machine <SERVER_NAME> login <YOUR_JFROG_USERNAME> password/identity-token <YOUR_JFROG_PASSWORD>/<YOUR_JFROG_IDENTITY-TOKEN>
<SERVER_NAME>
: URL of your JPD.<YOUR_JFROG_USERNAME>
: Your JPD username.<YOUR_JFROG_PASSWORD>/<YOUR_JFROG_IDENTITY_TOKEN>
: Your JPD password / Identity Token
For example:
machine my-awesome.jfrog.io login admin password cmVmdGtuOjAxOjE3NTA0jfauruYYt3u73totu1JqRVNSMWhUS1htQXlzb2lTcnVH