mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cloudstack: cs_volume: fix volume may be NoneType in check_mode (#2455)
This commit is contained in:
parent
be695eda69
commit
668f01c04c
1 changed files with 18 additions and 17 deletions
|
@ -341,6 +341,7 @@ class AnsibleCloudStackVolume(AnsibleCloudStack):
|
|||
def attached_volume(self):
|
||||
volume = self.present_volume()
|
||||
|
||||
if volume:
|
||||
if volume.get('virtualmachineid') != self.get_vm(key='id'):
|
||||
self.result['changed'] = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue