set ovirt disk active default (#57464)

* set ovirt disk active default value to True

* disk default activate only when creating

* correct comment syntax

* add changelog

* ovirt disk activate update docs
pull/57790/head
Martin Nečas 5 years ago committed by Martin Krizek
parent 6537d1bc0f
commit 4052d6d294

@ -0,0 +1,2 @@
bugfixes:
- Fix the issue that disk is not activated after its creation (https://github.com/ansible/ansible/issues/57412)

@ -190,6 +190,7 @@ options:
activate:
description:
- I(True) if the disk should be activated.
- When creating disk of virtual machine it is set to I(True).
version_added: "2.8"
type: bool
extends_documentation_fragment: ovirt
@ -709,6 +710,9 @@ def main():
ret = None
# First take care of creating the VM, if needed:
if state in ('present', 'detached', 'attached'):
# Always activate disk when its being created
if vm_service is not None and disk is None:
module.params['activate'] = True
ret = disks_module.create(
entity=disk if not force_create else None,
result_state=otypes.DiskStatus.OK if lun is None else None,

Loading…
Cancel
Save