From 943f4ebccf88b1e9f8a9734514d878b8a32c454b Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 27 Sep 2016 12:24:16 -0400 Subject: [PATCH] undefined var should fail 'label' setting (#17675) --- lib/ansible/executor/task_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index 14db3114de..485533f25b 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -276,7 +276,7 @@ class TaskExecutor: if label is not None: templar = Templar(loader=self._loader, shared_loader_obj=self._shared_loader_obj, variables=self._job_vars) - res['_ansible_item_label'] = templar.template(label, fail_on_undefined=False) + res['_ansible_item_label'] = templar.template(label) self._rslt_q.put(TaskResult(self._host.name, self._task._uuid, res), block=False) results.append(res)