diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_vm.py b/lib/ansible/modules/cloud/ovirt/ovirt_vm.py index a3677aa823..26e96b2ff6 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_vm.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_vm.py @@ -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'], )