From 92a53a718233992ff03fb0c71b76e91b549478d0 Mon Sep 17 00:00:00 2001 From: Fabian von Feilitzsch Date: Sat, 3 Dec 2016 08:47:52 -0500 Subject: [PATCH] Check values for vm_id and vm_names instead of keys (#3621) --- lib/ansible/modules/extras/cloud/ovirt/ovirt_disks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/cloud/ovirt/ovirt_disks.py b/lib/ansible/modules/extras/cloud/ovirt/ovirt_disks.py index 092fb051cf1..f354c7a6d25 100644 --- a/lib/ansible/modules/extras/cloud/ovirt/ovirt_disks.py +++ b/lib/ansible/modules/extras/cloud/ovirt/ovirt_disks.py @@ -280,7 +280,7 @@ def main(): ret = disks_module.remove() # If VM was passed attach/detach disks to/from the VM: - if 'vm_id' in module.params or 'vm_name' in module.params and state != 'absent': + if module.params.get('vm_id') is not None or module.params.get('vm_name') is not None and state != 'absent': vms_service = connection.system_service().vms_service() # If `vm_id` isn't specified, find VM by name: