Closed tomdeblende closed 1 year ago
Files identified in the description: None
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
Many thanks for taking the time to report this issue.
The issue here is that between Python 3 and Python 2 the Exception raised by the json module changed. With the Python 3 exception not being available on older Python 2 hosts.
While the bulk of this collection has dropped support for Python <3.6, I believe it's appropriate for this specific module to continue to support Python 2.7, since it doesn't depend on the botocore SDK (which drives our Python support policy).
I've added a fix in #1359, and included a specific integration test for running this against Python 2.x hosts.
I have seen development activity for this issue and waited for the new 7.3.0 Ansible version. It does not seem to be resolved in this version? Is that correct, or am I missing something?
@tomdeblende it looks like the fix didn't get backported to the 5.x release of this collection (I missed that the automatic backport failed). Collections can be updated separately from Ansible. This fix will be available with Release 6.0.0 of the collection, and hopefully 5.4.0 if a manual backport is successful
@tremble where can I check when 5.4.0 will be released? Looking at https://github.com/ansible-collections/amazon.aws/releases I see 5.3.0 is not listed while it is already available.
@tomdeblende There's no official date yet. The short answer is "Real Soon Now".
Unfortunately none of the usual suspects were able to meet the monthly working group meeting yesterday which is when we'd normally discuss the release. I'll poke folks and see if we can get the process started.
Summary
When using amazon.aws.ec2_metadata_facts on CentOS 7, Amazon Linux 1 and Amazon Linux 2, I get this error:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'module' object has no attribute 'JSONDecodeError'
On more recent OS'es it works fine.
Issue Type
Bug Report
Component Name
amazon.aws.ec2_metadata_facts
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Amazon Linux 2022
Steps to Reproduce
Expected Results
Being able to use the variables set by amazon.aws.ec2_metadata_facts.
Actual Results
Code of Conduct