cloudstack: cs_instance: fix missing resource error in check mode if instance is not yet present
This commit is contained in:
parent
01b36130a8
commit
7806d3d134
1 changed files with 4 additions and 2 deletions
|
@ -486,6 +486,8 @@ class AnsibleCloudStackInstance(AnsibleCloudStack):
|
||||||
else:
|
else:
|
||||||
instance = self.update_instance(instance)
|
instance = self.update_instance(instance)
|
||||||
|
|
||||||
|
# In check mode, we do not necessarely have an instance
|
||||||
|
if instance:
|
||||||
instance = self.ensure_tags(resource=instance, resource_type='UserVm')
|
instance = self.ensure_tags(resource=instance, resource_type='UserVm')
|
||||||
|
|
||||||
return instance
|
return instance
|
||||||
|
|
Loading…
Reference in a new issue