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:
parent
cf78759f5b
commit
f88dedb39d
1 changed files with 4 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue