Ansible roles are used to manage tasks, templates, files, and variables related to Ansible operation. You configure your Ansible client to resolve roles by configuring Ansible registry credentials in the .netrc
file. The .netrc file contains information used by the automatic login feature of the rexec and ftp commands. Artifactory supports the resolving of roles through remote repositories.
To configure the Ansible client to work with roles, update the .netrc file with the following snippet:
machine <SERVER_NAME> login <YOUR_JFROG_USERNAME> password/identity-token <YOUR_JFROG_PASSWORD>/<YOUR_JFROG_IDENTITY-TOKEN>
Where:
<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
Note
To work with 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 the Ansible Client to work with Collections
Grant chmod 600 .netrc
privileges.
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: