mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
cloudstack: cs_instance: fix missing resource error in check mode if instance is not yet present
This commit is contained in:
@@ -485,8 +485,10 @@ class AnsibleCloudStackInstance(AnsibleCloudStack):
|
||||
instance = self.deploy_instance()
|
||||
else:
|
||||
instance = self.update_instance(instance)
|
||||
|
||||
instance = self.ensure_tags(resource=instance, resource_type='UserVm')
|
||||
|
||||
# In check mode, we do not necessarely have an instance
|
||||
if instance:
|
||||
instance = self.ensure_tags(resource=instance, resource_type='UserVm')
|
||||
|
||||
return instance
|
||||
|
||||
|
||||
Reference in New Issue
Block a user