Installing collections from Git

,

I am trying to use a requirements file to install a collection from my own git repository.

In the documentation it says that I need to have something like this:

collections:

So I have mine looking like this

collections:

This didnt work. I thought it may be that it can’t get a collection artifact which I then added a release for. and changed the version number to v01-alpha as that has a tar.gz attached.

My version of ansible is core 2.12.0.dev0. I am using it within an execution environment in AWX.

Any help would be appreciated.

Many thanks.

You haven’t said what error you’re getting but looking at your repo, the only branch with anything in it is ‘develop’

It’s also not a valid collection:

ansible-galaxy collection install git+https://github.com/weiyentan/ansible.dbatools.collection.git,develop
Starting galaxy collection install process
Process install dependency map
ERROR! git+https://github.com/weiyentan/ansible.dbatools.collection.git,develop appears to be an SCM collection source, but the required galaxy.yml was not found. Append #path/to/collection/ to your URI (before the comma separated version, if one is specified) to point to a directory containing the galaxy.yml or directories of collections

Thank you Phil for replying. Sorry I should have said develop branch. In the root directory of develop branch I have ansible.yml there. Is it not formatted correctly? I apologise if I got it wrong. It’s my first time writing a collection…and consuming it from repository.

You need a galaxy.yml metadata file for a collection, see this guide - https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html

Thanks Phil. I had to reread a few times what I put in the repo. Galaxy.yml. Not ansible.yml. Mind says one thing. Fingers does another :rollseyes: