I was using an ansible galaxy module in an Ansible role.
However I wanted to make a change to the module, and I’m unsure how to ‘install’ my cloned repo so my role can use it.
In the documentation, it states you can do:
# from locally cloned git repository (git+file:// requires full paths)
- src: git+file:///home/bennojoy/nginx
However, if I clone a repository to my local file system, git clone https://github.com/roles-ansible/ansible_collection_users/
then this is my requirements.yml
:
---
collections:
- name: l3d.users
src: git+file:///home/michiel/a/ansible_collection_users
Then if I run ansible-galaxy
, it installs the module from galaxy, whereas I expect it to install my local git clone instead, as per the documentation. What am I missing?
$ ansible-galaxy install -r requirements.yml
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/l3d-users-1.1.4.tar.gz to /home/michiel/.ansible/tmp/ansible-local-758971n7s3d7vc/tmpv1ybqomm/l3d-users-1.1.4-a0styiqu
Installing 'l3d.users:1.1.4' to '/home/michiel/.ansible/collections/ansible_collections/l3d/users'
...