Install Ansible Roles using .netrc File

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

This section describes the steps to install Ansible roles using .netrc file via Ansible client CLI.

To locate install roles code snippet based on your repository selection, follow these steps:

  1. Click Application tab, and then click Artifacts under Artifactory.

  2. Locate the repository you want to configure, and then click Set Me Up.

    SetMeUpAnsible1.png

    Note

    Alternatively, you can also choose the repository from the Repository drop-down list under Set UP An Ansible Client modal.

  3. Enter your JFrog account password to generate a token, and then click Generate Token & Create Instructions.

    AnsibleGenerateToken.png
  4. Click the Install tab, copy and paste the Server in ansible.cfg file snippet of Roles to your ansible client.

    InstallAnsibleRolesServer_in_ansible_cfg_file.png

    Note

    You must configure .netrc 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 Roles using .netrc File section.

  5. Replace the placeholder <NAMESPACE.ROLE_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 role name.

ansible-galaxy role install <NAMESPACE.ROLE_NAME>.tar.gz

For example:

ansible-galaxy role install geerlingguy.k8s.tar.gz