From 1027abd5963182a73cec3b87f035572c0f59475a Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Thu, 5 Nov 2015 16:42:12 -0500 Subject: [PATCH] Cleaning up bugs related to perf improvement changes --- lib/ansible/executor/task_queue_manager.py | 2 +- lib/ansible/template/vars.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/ansible/executor/task_queue_manager.py b/lib/ansible/executor/task_queue_manager.py index 9dcb3769d9f..9d0dd74e7cc 100644 --- a/lib/ansible/executor/task_queue_manager.py +++ b/lib/ansible/executor/task_queue_manager.py @@ -96,7 +96,7 @@ class TaskQueueManager: self._workers = [] def _initialize_workers(self, num): - for i in xrange(num_workers): + for i in xrange(num): main_q = multiprocessing.Queue() rslt_q = multiprocessing.Queue() diff --git a/lib/ansible/template/vars.py b/lib/ansible/template/vars.py index b1b82d6d3e8..d55169368ac 100644 --- a/lib/ansible/template/vars.py +++ b/lib/ansible/template/vars.py @@ -83,10 +83,7 @@ class AnsibleJ2Vars: if isinstance(variable, dict) and varname == "vars" or isinstance(variable, HostVars): return variable else: - if self._templar._contains_vars(variable): - return self._templar.template(variable) - else: - return variable + return self._templar.template(variable) def add_locals(self, locals): '''