FreeKB - Ansible ansible-galaxy install collection
Ansible - ansible-galaxy install collection

The ansible-galaxy install command can be used to:

In this example, the ansible.posix collection is installed. Notice that by default, the collection is installed to the users collections (/home/john.doe/.ansible/collections).

~]$ ansible-galaxy collection install ansible.posix
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'ansible.posix:1.2.0' to '/home/john.doe/.ansible/collections/ansible_collections/ansible/posix'
Downloading https://galaxy.ansible.com/download/ansible-posix-1.2.0.tar.gz to /home/john.doe/.ansible/tmp/ansible-local-15258q2alfwvq/tmpdesamf4k
ansible.posix (1.2.0) was installed successfully


The -p or --collections-path option can be used to specify the installation directory. In this example, the ansible.posix collection will be installed to /usr/local/ansible/collections/ansible_collections/ansible/posix.

ansible-galaxy collection install ansible.posix --collections-path /usr/local/ansible/collections

 

In this scenario, it probably makes the most sense to append /usr/local/ansible/collections/ansible_collections/ansible/posix to the library directory in the main ansible.cfg file so that any user on the system can use a package in the ansible.posix collection.

library = /usr/local/ansible/collections/ansible_collections/ansible/posix

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 915f0 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |