Skip to content
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

fix(ec2_vol): output volume informations when volume exists in check mode #2133

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/202401025-ec2_vol.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- ec2_vol - output volume informations when volume exists in check mode (https://github.com/ansible-collections/amazon.aws/pull/2133).
4 changes: 3 additions & 1 deletion plugins/modules/ec2_vol.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,9 @@ def attach_volume(
if attachment_data[0].get("status") in ["attached", "attaching"]:
instance_id = attachment_data[0].get("instance_id", "None")
module.exit_json(
changed=False, msg=f"IN CHECK MODE - volume already attached to instance: {instance_id}."
changed=False,
msg=f"IN CHECK MODE - volume already attached to instance: {instance_id}.",
volume=volume_dict,
)
if not volume_dict["multi_attach_enabled"]:
# volumes without MultiAttach Enabled can be attached to 1 instance only
Expand Down
Loading