Skip to content

Instantly share code, notes, and snippets.

@markuman
Created December 6, 2020 13:28
Show Gist options
  • Save markuman/f3aaacbbdd2b3870de3c9b0930099228 to your computer and use it in GitHub Desktop.
Save markuman/f3aaacbbdd2b3870de3c9b0930099228 to your computer and use it in GitHub Desktop.
TASK [ec2_vol : attach existing volume to an instance] *************************
changed: [testhost] => {"changed": true, "device": "/dev/sdg", "resource_actions": ["ec2:AttachVolume", "ec2:DeleteTags", "ec2:DescribeVolumes", "ec2:DescribeTags", "ec2:DescribeInstances"], "volume": {"attachment_set": {"attach_time": "2020-12-06T13:22:26+00:00", "deleteOnTermination": false, "device": "/dev/sdg", "instance_id": "i-0e86653037a96f76d", "status": "attaching"}, "create_time": "2020-12-06T13:18:12.123000+00:00", "encrypted": false, "id": "vol-0989fdea794998809", "iops": null, "size": 1, "snapshot_id": "", "status": "in-use", "tags": {"Name": "None"}, "type": "standard", "zone": "eu-central-1a"}, "volume_id": "vol-0989fdea794998809", "volume_type": "standard"}
TASK [ec2_vol : check task return attributes] **********************************
fatal: [testhost]: FAILED! => {
"assertion": "vol_attach_result.volume.attachment_set.status == 'attached'",
"changed": false,
"evaluated_to": false,
"msg": "Assertion failed"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment