ec2_ami_facts: return images in a consistent order (#40679)

* ec2_ami_facts: return images in a consistent order
pull/40730/head
Sloane Hertel 6 years ago committed by GitHub
parent 496d10f7a8
commit 9d30434b6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -234,6 +234,7 @@ def list_ec2_images(ec2_client, module):
# describing launch permissions of images owned by others is not permitted, but shouldn't cause failures
pass
images.sort(key=lambda e: e.get('creation_date', '')) # it may be possible that creation_date does not always exist
module.exit_json(images=images)

Loading…
Cancel
Save