ovirt_vm: Add option to apply the configuration change on "Next Run" (#48286)
The PR adds new option "next_run" so that user can decide if the configuration has to be applied on the VM immediately or it has to be configured on next restart.
This commit is contained in:
parent
54db073817
commit
42c6ed7078
1 changed files with 8 additions and 0 deletions
|
@ -581,6 +581,12 @@ options:
|
|||
- "If I(true), the VM will migrate even if it is defined as non-migratable."
|
||||
version_added: "2.8"
|
||||
type: bool
|
||||
next_run:
|
||||
description:
|
||||
- "If I(true), the update will not be applied to the VM immediately and will be only applied when virtual machine is restarted."
|
||||
- NOTE - If there are multiple next run configuration changes on the VM, the first change may get reverted if this option is not passed.
|
||||
version_added: "2.8"
|
||||
type: bool
|
||||
|
||||
notes:
|
||||
- If VM is in I(UNASSIGNED) or I(UNKNOWN) state before any operation, the module will fail.
|
||||
|
@ -2049,6 +2055,7 @@ def main():
|
|||
export_domain=dict(default=None),
|
||||
export_ova=dict(type='dict'),
|
||||
force_migrate=dict(type='bool'),
|
||||
next_run=dict(type='bool'),
|
||||
)
|
||||
module = AnsibleModule(
|
||||
argument_spec=argument_spec,
|
||||
|
@ -2084,6 +2091,7 @@ def main():
|
|||
ret = vms_module.create(
|
||||
entity=vm,
|
||||
result_state=otypes.VmStatus.DOWN if vm is None else None,
|
||||
update_params={'next_run': module.params['next_run']} if module.params['next_run'] is not None else None,
|
||||
clone=module.params['clone'],
|
||||
clone_permissions=module.params['clone_permissions'],
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue