Thank you Jordan, Those two lines saved me lots of time.
I am using virtualenvwrapper, so I set the ANSIBLE_COLLECTIONS_PATHS in
virtual environment's postactivate, which it is going to set any time
switching to ansible-dev environment.

First cloned ansible_collections/community/aws, then had to
clone ansible_collections/amazon/aws when got module not found error when
tried to test the module through ansible-playbook.

Eventually we have to create more directories and clone respected
collections, as we are working on more modules, and that would be nice if
we had ansible-galaxy-dev command to clone the collection from github along
its dependencies at once(Like what James suggested).

Moving to collections is improvement for sure, thanks very much.




On Thu, 4 Jun 2020 at 22:10, Jordan Borean <[email protected]> wrote:

> You've identified one of the many annoying parts of collections. You need
>> a special directory structure and you can't install from git in an editable
>> manner.
>
>
> Admittedly you are right about the special directory structure but it's
> pretty trivial to install it from git in an editable manner. I do this for
> the Windows collections;
>
> # Usually I have this in my ~/.bashrc where the last segment is my dev
> location
> export ANSIBLE_COLLECTIONS_PATHS=~/.ansible/collections:/usr/share/ansible
> /collections:~/ansible-dev
> git clone [email protected]:ansible-collections/ansible.windows.git ~
> /ansible-dev/ansible_collections/ansible/windows
>
> I won't lie and say this is a perfect scenario but it's just 2 commands,
> one of which can be set automatically in your profile.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/c3c6a188-ff2c-4d5c-be96-774ce225023fo%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/c3c6a188-ff2c-4d5c-be96-774ce225023fo%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAJspodgkJGLi-KQk1_33rAT4LLyLw9U-KgrTwvXN7ay1DLU2%3DQ%40mail.gmail.com.

Reply via email to