feat(modules): Add hidden_fields argument

Add the hidden_fields argument to kubevirt_vm and kubevirt_{vm,vmi}_info
which allows to hide and ignore certain fields in the returned definition
of a VM or VMI. By default this argument is set to ignore changes to the
kubemacpool.io/transaction-timestamp annotation and managed fields, which
may change at any time and cause the modules to return a changed status
although nothing has changed other than their values.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
Felix Matouschek
2025-04-28 10:27:50 +02:00
parent fe822b3352
commit a9d7fa22aa
7 changed files with 137 additions and 1 deletions

View File

@@ -43,6 +43,7 @@ def execute_info_module(module, kind, wait_condition):
wait=module.params["wait"],
wait_sleep=module.params["wait_sleep"],
wait_timeout=module.params["wait_timeout"],
hidden_fields=module.params["hidden_fields"],
condition=wait_condition,
)
module.exit_json(changed=False, **facts)