Skip to content

Commit

Permalink
ovirt_vm: add volatile (#539)
Browse files Browse the repository at this point in the history
* ovirt_vm: add volatile

* Add changelog
  • Loading branch information
mnecas authored Jun 15, 2022
1 parent dc7b29f commit e405d03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/539-ovirt_vm-add-volatile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- ovirt_vm - add volatile (https://github.com/oVirt/ovirt-ansible-collection/pull/539).
7 changes: 7 additions & 0 deletions plugins/modules/ovirt_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,11 @@
type: int
default: 5
version_added: 2.1.0
volatile:
description:
- "Indicates that this run configuration will be discarded even in the case of guest-initiated reboot."
type: bool
version_added: 2.2.0
notes:
- If VM is in I(UNASSIGNED) or I(UNKNOWN) state before any operation, the module will fail.
If VM is in I(IMAGE_LOCKED) state before any operation, we try to wait for VM to be I(DOWN).
Expand Down Expand Up @@ -2635,6 +2640,7 @@ def main():
)
),
exclusive=dict(type='bool'),
volatile=dict(type='bool'),
export_domain=dict(default=None),
export_ova=dict(type='dict'),
force_migrate=dict(type='bool'),
Expand Down Expand Up @@ -2722,6 +2728,7 @@ def kernel_persist_check():
# Start action kwargs:
use_cloud_init=True if not module.params.get('cloud_init_persist') and module.params.get('cloud_init') else None,
use_sysprep=True if not module.params.get('cloud_init_persist') and module.params.get('sysprep') else None,
volatile=module.params.get('volatile'),
vm=otypes.Vm(
placement_policy=otypes.VmPlacementPolicy(
hosts=[otypes.Host(name=module.params['host'])]
Expand Down

0 comments on commit e405d03

Please sign in to comment.