From 60a68412965da4d9f2542526234f58e5e0d5bb1e Mon Sep 17 00:00:00 2001 From: Chris Keller Date: Tue, 21 Aug 2018 06:36:27 -0400 Subject: [PATCH] Fix for ovirt_disk Can't Update Disk Name Independently (#44371) (#44372) * Fix for ovirt_disk Can't Update Disk Name Independently (#44371) * Adding Disk Rename Example to Example Section (#44371) --- lib/ansible/modules/cloud/ovirt/ovirt_disk.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_disk.py b/lib/ansible/modules/cloud/ovirt/ovirt_disk.py index 2c42fad7bd..da8e86fd78 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_disk.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_disk.py @@ -181,6 +181,13 @@ EXAMPLES = ''' format: cow interface: virtio +# Change Disk Name +- ovirt_disk: + id: 00000000-0000-0000-0000-000000000000 + storage_domain: data + name: "new disk name" + vm_name: rhel7 + # Upload local image to disk and attach it to vm: # Since Ansible 2.3 - ovirt_disk: @@ -513,6 +520,7 @@ class DisksModule(BaseModule): def _update_check(self, entity): return ( + equal(self._module.params.get('name'), entity.name) and equal(self._module.params.get('description'), entity.description) and equal(self.param('quota_id'), getattr(entity.quota, 'id', None)) and equal(convert_to_bytes(self._module.params.get('size')), entity.provisioned_size) and