From 19b5008c0a1fdfad4aa1d305636ebf0a3635cc58 Mon Sep 17 00:00:00 2001 From: dragon3 Date: Fri, 1 Nov 2013 23:59:42 +0900 Subject: [PATCH] return volume_id/device even when volume mapping already exists --- library/cloud/ec2_vol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/cloud/ec2_vol b/library/cloud/ec2_vol index 784f07edd3..5a685b8971 100644 --- a/library/cloud/ec2_vol +++ b/library/cloud/ec2_vol @@ -212,7 +212,8 @@ def main(): if device_name: if device_name in inst.block_device_mapping: module.exit_json(msg="Volume mapping for %s already exists on instance %s" % (device_name, instance), - + volume_id=inst.block_device_mapping[device_name].volume_id, + device=device_name, changed=False) # If custom iops is defined we use volume_type "io1" rather than the default of "standard"