1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixed snapshot module, Resource not found issue for persistent-disk-0 (#35341)

This commit is contained in:
Rahul Paigavan 2019-05-14 03:08:20 +05:30 committed by ansibot
parent cf78759f5b
commit f88dedb39d

View file

@ -192,9 +192,11 @@ def main():
for instance_disk in instance_disks:
disk_snapshot_name = snapshot_name
device_name = instance_disk['deviceName']
disk_info = gce._get_components_from_path(instance_disk['source'])
device_name = disk_info['name']
device_zone = disk_info['zone']
if disks is None or device_name in disks:
volume_obj = gce.ex_get_volume(device_name)
volume_obj = gce.ex_get_volume(device_name, device_zone)
# If we have more than one disk to snapshot, prepend the disk name
if len(instance_disks) > 1: