Skip to content

Commit

Permalink
fix ec2_vol test
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Aug 31, 2021
1 parent d52de48 commit 6fe0ec5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/modules/ec2_vol.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,14 +819,14 @@ def main():
final_tags, tags_changed = ensure_tags(module, ec2_conn, volume['volume_id'], 'volume', tags, module.params.get('purge_tags'))

if detach_vol_flag:
volume, changed = detach_volume(module, ec2_conn, volume_dict=volume)
volume, attach_changed = detach_volume(module, ec2_conn, volume_dict=volume)
elif inst is not None:
volume, vol_attached = attach_volume(module, ec2_conn, volume_dict=volume, instance_dict=inst, device_name=device_name)
volume, attach_changed = attach_volume(module, ec2_conn, volume_dict=volume, instance_dict=inst, device_name=device_name)

# Add device, volume_id and volume_type parameters separately to maintain backward compatibility
volume_info = get_volume_info(module, volume, tags=final_tags)

if tags_changed or vol_attached:
if tags_changed or attach_changed:
changed = True

module.exit_json(changed=changed, volume=volume_info, device=device_name,
Expand Down

0 comments on commit 6fe0ec5

Please sign in to comment.