-
Notifications
You must be signed in to change notification settings - Fork 342
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 option "metadata_token_ttl_seconds" to ec2_metadata_facts module. #2209
Add option "metadata_token_ttl_seconds" to ec2_metadata_facts module. #2209
Conversation
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 5m 06s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good as a starting point, thanks for this. 3 things:
-
Please add an integration test for the change. The current tests for this module can be found in tests/integration/targets/ec2_metadata_facts/playbooks/test_metadata.yml
I think this can be as simple as overwriting some of the gathered facts, running ec2_metadata_facts again with the timeout set, and then testing that the facts got updated. -
Please add a changelog fragment
-
Please add "version_added: 8.2.0" to the documentation for options (just underneath default, at the same indentation.
@tremble thanks for the comments, I've added integration test and changelog fragments as suggested. |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 37s |
changelogs/fragments/2209-ec2_metadata_facts-add-configurable-ttl-parameter.yml
Outdated
Show resolved
Hide resolved
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 53s |
Build succeeded (gate pipeline). ✔️ ansible-galaxy-importer SUCCESS in 4m 51s |
5756ac4
into
ansible-collections:main
Backport to stable-8: 💚 backport PR created✅ Backport PR branch: Backported as #2210 🤖 @patchback |
…#2209) Fixes: #2205 SUMMARY ec2_metadata_facts sometimes returns 401 unauthorized if the IMDSv2 token times out. The token TTL is currently hardcoded to 60, this pull request aims to make it configurable. ISSUE TYPE Feature Pull Request COMPONENT NAME ec2_metadata_facts Reviewed-by: Mark Chappell (cherry picked from commit 5756ac4)
…#2209) (#2210) Depends-On: #2258 This is a backport of PR #2209 as merged into main (5756ac4). Fixes: #2205 SUMMARY ec2_metadata_facts sometimes returns 401 unauthorized if the IMDSv2 token times out. The token TTL is currently hardcoded to 60, this pull request aims to make it configurable. ISSUE TYPE Feature Pull Request COMPONENT NAME ec2_metadata_facts Reviewed-by: Mark Chappell Reviewed-by: Alina Buzachis
…ansible-collections#2209) Fixes: ansible-collections#2205 SUMMARY ec2_metadata_facts sometimes returns 401 unauthorized if the IMDSv2 token times out. The token TTL is currently hardcoded to 60, this pull request aims to make it configurable. ISSUE TYPE Feature Pull Request COMPONENT NAME ec2_metadata_facts Reviewed-by: Mark Chappell
Fixes: #2205
SUMMARY
ec2_metadata_facts
sometimes returns401 unauthorized
if the IMDSv2 token times out. The token TTL is currently hardcoded to60
, this pull request aims to make it configurable.ISSUE TYPE
COMPONENT NAME
ec2_metadata_facts