-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for EC2 dynamic data in ec2_facts #21532
Conversation
Just checking in if there was any update on this. I don't think there will be any action from @silviud; he doesn't seem to actively checks PRs. Maybe this PR should be community reviewed? |
d021f1e
to
a02c6cf
Compare
The test
|
Renaming/deprecating a module should be done in a separate PR from actual code changes. There are two reasons for this:
|
Oh, and a third reason. The bot will ping namespace maintainers on a rename, despite the module not being new. It's better to do this on a PR which will quickly be merged (the rename), instead of pulling in a lot of maintainers to discussion on changes for the module which really only need to involve the module maintainer(s). |
Unfortunately this PR has sat out for a long time; I'm happy to change it back to the old name and submit a PR if that will speed things along. I kept trying to find guidelines on the module rename process with changes, but I didn't find much guidance, except for @ryansb's proposal suggested by @s-hertel. I would still like to modify the Ansible doc of the old module so that return values are properly documented. |
@roadmapper If you want help with putting this back the way it was prior to the renaming changes let me know. I agree with mattclay's points but I'm sorry about your inconvenience with the back and forth. |
- Flattens out JSON in the instance identity document and IAM info/credentials for easy access to facts - This changes region fact from ‘ansible_ec2_placement_region’ to ’ansible_ec2_instance_identity_document_region’
- Update documentation for ec2_facts with return values - Preserve JSON value from the metadata service for backwards compatibility - Fix bug in fix_invalid_varnames - The keys in the dict were being modified in place; new dict now created to hold the sanitized keys - Consolidate two replace calls with a regex substitution - Move imports for ec2_facts to the top
Reverted the module rename and tested, ready_for_review |
Merged, thanks for your patience and bearing with us! |
And apologies for my bad suggestion of doing the deprecation at the same time. |
ISSUE TYPE
COMPONENT NAME
module ec2_facts
ANSIBLE VERSION
SUMMARY
This change allows the ec2_facts module to set facts with the data from the EC2 dynamic data (instance identity document, signatures, etc.). Due to the this, parsing the region out of the availability zone is no longer needed; the hardcoded list of regions and parsing are removed and the old placement region key is left for backwards compatibility.
Minor changes:
Before
After