From 5cdbcf6442dd1a473bb17e476b0695ab303f2271 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Mon, 22 Apr 2024 17:22:22 +0200
Subject: [PATCH] ipahost: Enable batch command with keeponly

The use of the batch command is enabled for execute_ipa_commands.

Additionally keeponly is set to ["randompassword"] as this is the only
parameter that is used from the data returned from the commands.
---
 plugins/modules/ipahost.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/modules/ipahost.py b/plugins/modules/ipahost.py
index a1d21423..3e6c3327 100644
--- a/plugins/modules/ipahost.py
+++ b/plugins/modules/ipahost.py
@@ -1601,7 +1601,7 @@ def main():
         # Execute commands
 
         changed = ansible_module.execute_ipa_commands(
-            commands, result_handler,
+            commands, result_handler, batch=True, keeponly=["randompassword"],
             exit_args=exit_args, single_host=hosts is None)
 
     # Done
-- 
GitLab