amazon.aws icon indicating copy to clipboard operation
amazon.aws copied to clipboard

[FR] aws_ec2 (dynamic inventory) use "aws ssm get-inventory" info also

Open Hokwang opened this issue 2 years ago • 1 comments

Summary

Hi,

I think aws_ec2 plugin use ec2 metadata only, but user who already set up ssm inventroy can use/get ssm inventroy info, too.

When I was searching aws_ec2 plugin, there's no way to get OS (distro) info, and ansible_distribution can not use.

so I request the way to get ssm inventory or use directly in aws_ec2 plugin.

Thanks,

Issue Type

Feature Idea

Component Name

aws_ec2

Additional Information


Code of Conduct

  • [X] I agree to follow the Ansible Code of Conduct

Hokwang avatar Mar 09 '22 15:03 Hokwang

Files identified in the description:

  • [plugins/inventory/aws_ec2.py](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/inventory/aws_ec2.py)

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Mar 09 '22 15:03 ansibullbot

@Hokwang #1369 has introduced a new feature allowing you to add ssm inventory information into host vars, could you please give it a try and see if this matches your expectation?

abikouo avatar Feb 16 '23 15:02 abikouo

@abikouo OMG!! I will test soon and tell you. thank you!

Hokwang avatar Feb 16 '23 15:02 Hokwang

@abikouo So sorry for late, now it merged but, I guarantee this works!

Hokwang avatar Aug 31 '23 09:08 Hokwang

The option use_ssm_inventory limits to use only if the number of instances in the syncing account is less than the allowed limit of instances for SSM send_command. The issue is highlighted in #1713.

vijayreddiar avatar Jan 22 '24 16:01 vijayreddiar