Skip to content

Commit

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

Signed-off-by: Miguel Martín <[email protected]>

* add changelog

Signed-off-by: Miguel Martín <[email protected]>

---------

Signed-off-by: Miguel Martín <[email protected]>
  • Loading branch information
mmartinv authored Sep 14, 2023
1 parent 6736a45 commit b4756e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/722-add-tpm-enabled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- ovirt_vm - Add tpm_enabled (https://github.com/oVirt/ovirt-ansible-collection/pull/722).
8 changes: 8 additions & 0 deletions plugins/modules/ovirt_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,11 @@
>0 - Number of Virtio SCSI queues to use by virtual machine."
type: int
version_added: 1.7.0
tpm_enabled:
description:
- "If `true`, a TPM device is added to the virtual machine."
type: bool
version_added: 3.2.0
wait_after_lease:
description:
- "Number of seconds which should the module wait after the lease is changed."
Expand Down Expand Up @@ -1610,6 +1615,7 @@ def build_entity(self):
) if self.param('virtio_scsi_enabled') is not None else None,
multi_queues_enabled=self.param('multi_queues_enabled'),
virtio_scsi_multi_queues=self.param('virtio_scsi_multi_queues'),
tpm_enabled=self.param('tpm_enabled'),
os=otypes.OperatingSystem(
type=self.param('operating_system'),
boot=otypes.Boot(
Expand Down Expand Up @@ -1814,6 +1820,7 @@ def check_custom_compatibility_version():
equal(self.param('virtio_scsi_enabled'), getattr(entity.virtio_scsi, 'enabled', None)) and
equal(self.param('multi_queues_enabled'), entity.multi_queues_enabled) and
equal(self.param('virtio_scsi_multi_queues'), entity.virtio_scsi_multi_queues) and
equal(self.param('tpm_enabled'), entity.tpm_enabled) and
equal(self.param('rng_device'), str(entity.rng_device.source) if entity.rng_device else None) and
equal(provided_vm_display.get('monitors'), getattr(vm_display, 'monitors', None)) and
equal(provided_vm_display.get('copy_paste_enabled'), getattr(vm_display, 'copy_paste_enabled', None)) and
Expand Down Expand Up @@ -2664,6 +2671,7 @@ def main():
virtio_scsi_multi_queues=dict(type='int'),
snapshot_name=dict(type='str'),
snapshot_vm=dict(type='str'),
tpm_enabled=dict(type='bool'),
)
module = AnsibleModule(
argument_spec=argument_spec,
Expand Down

0 comments on commit b4756e3

Please sign in to comment.