From f1f44843c318b836450e243d7a65ad5f0afb7896 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 24 Oct 2012 07:56:23 -0400 Subject: [PATCH] close the pool. --- lib/ansible/runner/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index e0a17914743..b44a569a35e 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -564,10 +564,12 @@ class Runner(object): p = multiprocessing.Pool(self.forks) try: - return p.map(_executor_hook, hosts) + result = p.map(_executor_hook, hosts) + p.close() except KeyboardInterrupt: p.terminate() raise errors.AnsibleError("Interrupted") + return result # *****************************************************