summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian von Feilitzsch <fabianvf@users.noreply.github.com>2016-12-03 08:47:52 -0500
committerRené Moser <mail@renemoser.net>2016-12-03 14:47:52 +0100
commit60d466a68f02d947f65dceecc48fe84a9d804592 (patch)
tree4dd35f2665d3da65b49324f2d7cc1a40dbc7782e
parent519cc173451a0fb67799a20a04730a9d6f252b4e (diff)
downloadansible-modules-extras-60d466a68f02d947f65dceecc48fe84a9d804592.tar.gz
Check values for vm_id and vm_names instead of keys (#3621)
-rw-r--r--cloud/ovirt/ovirt_disks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloud/ovirt/ovirt_disks.py b/cloud/ovirt/ovirt_disks.py
index 092fb051..f354c7a6 100644
--- a/cloud/ovirt/ovirt_disks.py
+++ b/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: