From 079b29a5330a24a3d2f36ebedacbebefffc08e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Mart=C3=ADn?= Date: Thu, 14 Sep 2023 12:03:29 +0200 Subject: [PATCH 1/2] ovirt_vm: add tpm_enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Martín --- plugins/modules/ovirt_vm.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/modules/ovirt_vm.py b/plugins/modules/ovirt_vm.py index 3d41ec6d..f1a678ae 100644 --- a/plugins/modules/ovirt_vm.py +++ b/plugins/modules/ovirt_vm.py @@ -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." @@ -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( @@ -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 @@ -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, From 9d6b313667119a9ab56260e70bbbd81882c0323a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Mart=C3=ADn?= Date: Thu, 14 Sep 2023 12:08:20 +0200 Subject: [PATCH 2/2] add changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Martín --- changelogs/fragments/722-add-tpm-enabled.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelogs/fragments/722-add-tpm-enabled.yml diff --git a/changelogs/fragments/722-add-tpm-enabled.yml b/changelogs/fragments/722-add-tpm-enabled.yml new file mode 100644 index 00000000..d18f6320 --- /dev/null +++ b/changelogs/fragments/722-add-tpm-enabled.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - ovirt_vm - Add tpm_enabled (https://github.com/oVirt/ovirt-ansible-collection/pull/722).