summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndra Machacek <machacek.ondra@gmail.com>2018-03-15 21:56:25 +0100
committerMatt Davis <nitzmahone@users.noreply.github.com>2018-03-15 13:56:25 -0700
commit9f02fea15b1e72536f1e56aef09201a3586b4899 (patch)
tree5f50a29c7e26cdd5a5ca4bf6ea64a2d207b15834
parent8d7fe469ea471fff6020b437a7435936360b479f (diff)
downloadansible-9f02fea15b1e72536f1e56aef09201a3586b4899.tar.gz
ovirt_vms: Pass correct VM entity to create method (#37460)
-rw-r--r--lib/ansible/modules/cloud/ovirt/ovirt_vms.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_vms.py b/lib/ansible/modules/cloud/ovirt/ovirt_vms.py
index ce2b4702b2..6cc40de787 100644
--- a/lib/ansible/modules/cloud/ovirt/ovirt_vms.py
+++ b/lib/ansible/modules/cloud/ovirt/ovirt_vms.py
@@ -1898,6 +1898,7 @@ def main():
vms_module.changed = import_vm(module, connection)
ret = vms_module.create(
+ entity=vm,
result_state=otypes.VmStatus.DOWN if vm is None else None,
clone=module.params['clone'],
clone_permissions=module.params['clone_permissions'],
@@ -1920,6 +1921,7 @@ def main():
)
elif state == 'suspended':
vms_module.create(
+ entity=vm,
result_state=otypes.VmStatus.DOWN if vm is None else None,
clone=module.params['clone'],
clone_permissions=module.params['clone_permissions'],