mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
ovirt_disks: Fix fail condition for LUN disk (#38726)
Fixes: https://github.com/ansible/ansible/issues/38661
This commit is contained in:
parent
8f5320435f
commit
efa7ebb8a5
1 changed files with 2 additions and 2 deletions
|
@ -529,7 +529,7 @@ class DisksModule(BaseModule):
|
|||
def _update_check(self, entity):
|
||||
return (
|
||||
equal(self._module.params.get('description'), entity.description) and
|
||||
equal(self.param('quota_id'), getattr(entity.quota, 'id')) 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
|
||||
equal(self._module.params.get('shareable'), entity.shareable)
|
||||
)
|
||||
|
@ -617,7 +617,7 @@ def main():
|
|||
ret = disks_module.create(
|
||||
entity=disk,
|
||||
result_state=otypes.DiskStatus.OK if lun is None else None,
|
||||
fail_condition=lambda d: d.status == otypes.DiskStatus.ILLEGAL,
|
||||
fail_condition=lambda d: d.status == otypes.DiskStatus.ILLEGAL if lun is None else False,
|
||||
)
|
||||
is_new_disk = ret['changed']
|
||||
ret['changed'] = ret['changed'] or disks_module.update_storage_domains(ret['id'])
|
||||
|
|
Loading…
Reference in a new issue