-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
Changed behavior with ec2_ami - version 2.5.0 #38482
Comments
Files identified in the description: If these files are inaccurate, please update the |
Looks like the required: false was removed? https://github.com/ansible/ansible/pull/28506/files#diff-dbbe5ac2528c8137437e22f5bf1cbca2L38 |
@maishsk - that change is irrelevant - The more important difference is https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/amazon/ec2_ami.py#L680 The underlying reason is that Does the name just default to |
@willthames Thanks for the clarification - the my.ami - is NOT the default - the problem is that there is no default - and the is a backward compatible breaking change. Documentation does not reflect this.. :) |
You say it works in 2.4.2 though - how did it work? Or did the AMI not get a name at all with 2.4.2? |
With 2.4.2 I was not required to add a name parameter when changing permissions - I assume it because of the change - you mentioned above. I checked the following which works both on 2.4.2.0 and on 2.5.0
As soon as the name field is empty - on both versions the code that I used in 2.4.2.0 works also with 2.5.0. Is it possible to put a default as empty in the code - unless specifically set? When setting to |
Just submitted #38514 to fix this... |
* Added empty default Fix for issue #38482
I think I'm seeing a similiar issue... because the wait: yes doesn't seem to work anymore, I'm trying to call ec2_ami twice, once to create an ami, then waiting to see it become available using ec2_ami_facts, and once it is ready, I then try to share the AMI, but I get this error:
|
* removed additional check for name parameter (cherry picked from commit 91357d0) * Added empty default Fix for issue #38482 (cherry picked from commit 60a3277) * [ec2_ami] Ensure name or image_id is provided for state=present (#38972) Add integration tests for backward compatibility and ensuring name or image_id is provided (cherry picked from commit e2aa115)
* Added empty default Fix for issue ansible#38482
ISSUE TYPE
COMPONENT NAME
ec2_ami
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
MacOS High Sierra
SUMMARY
name
parameter that is now mandatory on all ec2_ami module actions - this was not the case beforeSTEPS TO REPRODUCE
ansible-playbook playbook.yml
EXPECTED RESULTS
In version 2.4.2.0 the result was successful
ACTUAL RESULTS
It seems that the
name
is now mandatory for all plays - this was not the case before.What changed???
The text was updated successfully, but these errors were encountered: