My first question is, what was the criteria for moving each modules to different repositories ? so we know the correct place to submit future aws modules !!! is there a change log for this move ?
My second question is for those with more experience with Ansible and github:
isn’t better to make the amazon.aws plugin directory be the sub repository/sub module/fork or mirror of community.aws plugin directory ? this way modules and plugins version and code stay the same in both, while one will be used as collection and one as module !!!
Largely the split was done between what was previously “core” supported and what was community supported.
amazon.aws is supported by Red Hat/Ansible employees, and community.aws is technically supported by the community.
New modules/plugins should almost definitely be submitted to community.aws, and if it is deemed it should be supported, it can be moved at a later date.
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. There's no equivalent to `ansible-galaxy install -gr requirements.yml` that gives you a git repo you can edit and push and pull. You'll further find it difficult to type `ansible -m community.general.my_module ...` using the very long name versus the short name you've always used before.
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
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.
Created a new module in “~/ansible_dev/ansible_collections/community/aws/plugins/modules”, but neither ansible-playbook nor ansible-doc finds the new module. for the sake of test, copied a module to new name, to make sure it is not related to module content, and original module can be found, but not the new one.
Thank you Matt, adding FQDN of the module fixed the problem either in playbook or ansible-doc command line.
How is that existing modules can be found just with their name but not the new one ?
There is action_groups.yml in meta directory, but adding testing_module to it didn’t make any difference.