How to check if Ansible collection is installed or not

How to check if Ansible collection is installed or not

To check if a particular Ansible collection is installed, you can use the ansible-galaxy command with the collection list option. This command will list all the collections that are currently installed on your system.

For example, to check if the community.aws collection is installed, you can use the following command:

ref‮ual:ot re‬tturi.com
ansible-galaxy collection list | grep community.aws

If the collection is installed, this command will output the collection name and version. If the collection is not installed, the command will not produce any output.

You can also use the ansible-galaxy command with the collection search option to search for a particular collection. For example:

ansible-galaxy collection search community.aws

This command will search for the community.aws collection in the Ansible Galaxy and display the search results.

By using the ansible-galaxy command with the collection list or collection search options, you can check if a particular ansible collection is installed or not on your system. This can be useful for managing and organizing your ansible collections.

Created Time:2017-10-28 21:38:59  Author:lautturi