diff --git a/lib/ansible/executor/task_queue_manager.py b/lib/ansible/executor/task_queue_manager.py index 9dcb3769d9..9d0dd74e7c 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 b1b82d6d3e..d55169368a 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): '''