diff --git a/changelogs/fragments/ovirt_fix_issue_in_resseting_sd_lease.yaml b/changelogs/fragments/ovirt_fix_issue_in_resseting_sd_lease.yaml new file mode 100644 index 00000000000..549b0bc2540 --- /dev/null +++ b/changelogs/fragments/ovirt_fix_issue_in_resseting_sd_lease.yaml @@ -0,0 +1,2 @@ +bugfixes: + - Fix issue in resetting the storage domain lease in ovirt_vm module. diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_vm.py b/lib/ansible/modules/cloud/ovirt/ovirt_vm.py index 247051b50da..4afd92bec71 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_vm.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_vm.py @@ -262,7 +262,7 @@ options: version_added: "2.5" lease: description: - - Name of the storage domain this virtual machine lease reside on. + - Name of the storage domain this virtual machine lease reside on. Pass an empty string to remove the lease. - NOTE - Supported since oVirt 4.1. version_added: "2.4" custom_compatibility_version: @@ -1296,7 +1296,7 @@ class VmsModule(BaseModule): id=get_id_by_name( service=self._connection.system_service().storage_domains_service(), name=self.param('lease') - ) + ) if self.param('lease') else None ) ) if self.param('lease') is not None else None, cpu=otypes.Cpu(