From d155e228af1cdaf6b7988c69828cec416bdee1be Mon Sep 17 00:00:00 2001 From: Ondra Machacek Date: Wed, 27 Mar 2019 13:18:33 +0100 Subject: [PATCH] kubevirt_vm: Fix waiting for ephemral VM (#54453) --- lib/ansible/modules/cloud/kubevirt/kubevirt_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/kubevirt/kubevirt_vm.py b/lib/ansible/modules/cloud/kubevirt/kubevirt_vm.py index 730aa0ed74..dca63dcc7a 100644 --- a/lib/ansible/modules/cloud/kubevirt/kubevirt_vm.py +++ b/lib/ansible/modules/cloud/kubevirt/kubevirt_vm.py @@ -316,7 +316,7 @@ class KubeVirtVM(KubeVirtRawModule): definition['spec']['running'] = state == 'running' # Execute the CURD of VM: - template = definition['spec']['template'] + template = definition if ephemeral else definition['spec']['template'] kind = 'VirtualMachineInstance' if ephemeral else 'VirtualMachine' dummy, definition = self.construct_vm_definition(kind, definition, template) result = self.execute_crud(kind, definition)