ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
14.01k stars 3.42k forks source link

RFE Enable aws_ec2 inventory plugin for ansible 2.9+ #3472

Closed kdelee closed 4 years ago

kdelee commented 5 years ago
ISSUE TYPE

Breaking out final acceptance criteria for aws_ec2 plugin because won't ship with first PR for https://github.com/ansible/awx/issues/171

COMPONENT NAME
SUMMARY

We want parity when using Amazon EC2 inventory source between scripts and plugins for:

The current known blockers are in the category of source vars (default is listed with key):

No parity but we think we need to punt because it never worked in the first place:

No parity because we enforce our own setting:

Current known DONE items (or are implemented by other features like group_by):

No parity because plugin is only EC2 and we only ever supported use of EC2 script for EC2 even though it really did more than that:

???? Don't know whats up with these

ADDITIONAL INFORMATION

Will update with related issues if they arise for individual vars\ @AlanCoding , you know who you are

AlanCoding commented 5 years ago

I believe this issue is now unblocked, although we do not have a specific person assigned to it yet. With the merge of https://github.com/ansible/ansible/pull/41637, the remaining items like nested_groups just require some switches on the AWX side.

JonTheNiceGuy commented 4 years ago

I've raised an issue (#ansible/68506) on the ansible/ansible side of things, because there was an issue with the ec2.py dynamic inventory script, and I thought it was on their side... but it turns out this is part of a larger problem that the ec2.py script uses the boto library, which is depreciated, and there's an aws_ec2 plugin instead that should be being used. I have a recent install of AWX and the ec2.py script is the one which is used when using the ec2 inventory type. Is there a loose idea of when aws_ec2 should be the default option, and is there a way to use it today?

AlanCoding commented 4 years ago

The inventory plugin isn't in ansible/ansible anymore either. The updated plan is https://github.com/ansible/awx/pull/6283, since the plugin moved to a collection, we will ship that collection and use the version from it.

We have logic written to use the aws_ec2 plugin, and as pointed out in your Ansible issue, the form of the inputs are expressed in a test:

https://github.com/ansible/awx/blob/devel/awx/main/tests/data/inventory/plugins/ec2/files/aws_ec2.yml

But the decision was made to not enable this because of the shortcomings mentioned above in this issue.

You can add a aws_ec2.yml file to source control, and use it as an SCM inventory for now.

AlanCoding commented 4 years ago

being done in https://github.com/ansible/awx/pull/6283

kdelee commented 4 years ago

We are now using the plugin and our regression tests are running and passing -- calling this verified. Any follow up issues for options or small bugs will be tracked in new issues.