Once you have found the collection you want to install, it can be installed locally on the control node using
ansible-galaxy collection install <collection>
For our example we’ll be installing the community.MongoDB collection, which can be found in Collections in the Community Namespace here. It can be installed using the following command:
By default it will be installed into your ~/.ansible/collections folder, where it will be added to the stack. This is the default because in general it’s not good practice to include code from a third party in your repository.
Having said this, it is possible to specify different directory like ./collections to keep it with your repo using -p.
Top comments (1)
Once you have found the collection you want to install, it can be installed locally on the control node using
For our example we’ll be installing the community.
MongoDBcollection, which can be found in Collections in the Community Namespace here. It can be installed using the following command:By default it will be installed into your ~/.ansible/collections folder, where it will be added to the stack. This is the default because in general it’s not good practice to include code from a third party in your repository.
Having said this, it is possible to specify different directory like ./collections to keep it with your repo using -p.
After running the above command, you should now see the collections folder in your file tree.