aws community edition and collection

247 views
Skip to first unread message

Sydo Luciani

unread,
Jun 3, 2020, 11:40:44 AM6/3/20
to ansible...@googlegroups.com
aws modules have been redirected/moved to two different repositories, some to community.aws and some to amazon.aws


 
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 !!!!

Thanks

Matt Martz

unread,
Jun 3, 2020, 11:47:15 AM6/3/20
to ansible...@googlegroups.com
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 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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJspodgXNZsv1BvE1GtTWPrLW_b9o-wAs%3Dt5np1-xa1kKJJ%3D2w%40mail.gmail.com.


--
Matt Martz
@sivel
sivel.net

Sydo Luciani

unread,
Jun 4, 2020, 5:32:38 PM6/4/20
to Ansible Project
Thank you for quick reply.

What is the procedure to install Ansible version 10 along with amazon.aws and community.aws

I was able to install Ansible version 10 from repository:

but getting error installing modules from community.aws:

community.aws.git does not have all required files to be installable by pip.


Thanks

On Wednesday, 3 June 2020 10:47:15 UTC-5, Matt Martz wrote:
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.

On Wed, Jun 3, 2020 at 10:40 AM Sydo Luciani <sydo....@gmail.com> wrote:
aws modules have been redirected/moved to two different repositories, some to community.aws and some to amazon.aws


 
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 !!!!

Thanks

--
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 ansible...@googlegroups.com.

Matt Martz

unread,
Jun 4, 2020, 5:35:58 PM6/4/20
to ansible...@googlegroups.com
Collections are not pip installable.

Instead you want to do:

ansible-galaxy collection install amazon.aws

To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8477201e-a72a-45a5-a610-1d795fe21199o%40googlegroups.com.

Sydo Luciani

unread,
Jun 4, 2020, 8:15:39 PM6/4/20
to ansible...@googlegroups.com
Thank you Matt, that worked, eventhough the collection is behind the github repository.

Any recommendation or guidance on setting up development environment will be highly appreciated.
I did follow below document to set up development environment, but considering changes in ansible repository structure, not applicable for community modules any more:


 

Sydo Luciani

unread,
Jun 4, 2020, 8:37:44 PM6/4/20
to ansible...@googlegroups.com
The only option that I can think of:
cp community.aws/plugins/modules/my_module.py ~/.ansible/plugins/modules/

edit  ~/.ansible/plugins/modules/my_module.py and then copy it back to git repository to commit and push.

Any elegant solution ?
How you guys at ansible have setup the development environment to develop amazon.aws ?

Thanks
 

James Cassell

unread,
Jun 4, 2020, 9:51:21 PM6/4/20
to Ansible List

On Thu, Jun 4, 2020, at 8:37 PM, Sydo Luciani wrote:
> The only option that I can think of:
> pip install https://github.com/ansible/ansible/archive/devel.tar.gz
> git clone https://github.com/ansible-collections/community.aws.git
> cp community.aws/plugins/modules/my_module.py ~/.ansible/plugins/modules/
>
> edit ~/.ansible/plugins/modules/my_module.py and then copy it back to
> git repository to commit and push.
>
> Any elegant solution ?
> How you guys at ansible have setup the development environment to
> develop amazon.aws ?
>

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.

V/r,
James Cassell

Jordan Borean

unread,
Jun 4, 2020, 11:10:17 PM6/4/20
to Ansible Project
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 git@github
.com: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.

Felix Fontein

unread,
Jun 5, 2020, 2:32:15 AM6/5/20
to ansible...@googlegroups.com
Hi,

> Thank you Matt, that worked, eventhough the collection is behind the
> github repository.
>
> Any recommendation or guidance on setting up development environment
> will be highly appreciated.
> I did follow below document to set up development environment, but
> considering changes in ansible repository structure, not applicable
> for community modules any more:
> https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#common-environment-setup

that documentation is for Ansible 2.9. Until 2.10 has been released,
the devel docs are usually more helpful.

You might also be interested in
https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html
whose last section describes how to set up collections for development.

Cheers,
Felix


Sydo Luciani

unread,
Jun 5, 2020, 3:06:56 AM6/5/20
to ansible...@googlegroups.com
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.
 



--
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 ansible-proje...@googlegroups.com.

Sydo Luciani

unread,
Jun 8, 2020, 10:58:45 AM6/8/20
to ansible...@googlegroups.com
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.

ansible-doc -t module testing_module

Checking collections development document:
but can't find any thing about adding a new module.

What am I missing ?

Thanks
 

On Thu, 4 Jun 2020 at 22:10, Jordan Borean <jbor...@gmail.com> wrote:
--
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 ansible-proje...@googlegroups.com.

Matt Martz

unread,
Jun 8, 2020, 11:00:43 AM6/8/20
to ansible...@googlegroups.com
You have to use the FQCN of the module, at least for ansible-doc:  community.aws.testing_module

Sydo Luciani

unread,
Jun 8, 2020, 11:21:51 AM6/8/20
to ansible...@googlegroups.com
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.

Matt Martz

unread,
Jun 8, 2020, 11:51:47 AM6/8/20
to ansible...@googlegroups.com
That is controlled by lib/ansible/config/ansible_builtin_runtime.yml

It is designed to only allow modules which shipped with Ansible previously, to work without needing to use the FQCN for backwards compatibility.

Reply all
Reply to author
Forward
0 new messages