From 9301c184283108da3ebc96a2e40f048898fbdfcd Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Tue, 5 Feb 2019 22:23:12 +0100 Subject: [PATCH] Pass number of forks to TQM from CLI/config (#51669) Fixes #51622 --- lib/ansible/executor/playbook_executor.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/ansible/executor/playbook_executor.py b/lib/ansible/executor/playbook_executor.py index 5adecdd7f2..4fad903a52 100644 --- a/lib/ansible/executor/playbook_executor.py +++ b/lib/ansible/executor/playbook_executor.py @@ -56,8 +56,13 @@ class PlaybookExecutor: context.CLIARGS.get('listtags') or context.CLIARGS.get('syntax'): self._tqm = None else: - self._tqm = TaskQueueManager(inventory=inventory, variable_manager=variable_manager, - loader=loader, passwords=self.passwords) + self._tqm = TaskQueueManager( + inventory=inventory, + variable_manager=variable_manager, + loader=loader, + passwords=self.passwords, + forks=context.CLIARGS.get('forks'), + ) # Note: We run this here to cache whether the default ansible ssh # executable supports control persist. Sometime in the future we may