From d54d9dabe955b3982711c8efbd4fc1548ef59121 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 18 Feb 2016 02:21:58 -0800 Subject: [PATCH] added specific info to deprecation message should now show actual variable that is undefined fixes #14526 --- lib/ansible/executor/task_executor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index 2af5908a275..dd3f69bd0f6 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -35,7 +35,7 @@ from ansible.playbook.task import Task from ansible.template import Templar from ansible.utils.encrypt import key_for_hostname from ansible.utils.listify import listify_lookup_plugin_terms -from ansible.utils.unicode import to_unicode +from ansible.utils.unicode import to_unicode, to_bytes from ansible.vars.unsafe_proxy import UnsafeProxy, wrap_var try: @@ -185,7 +185,7 @@ class TaskExecutor: loop_terms = listify_lookup_plugin_terms(terms=self._task.loop_args, templar=templar, loader=self._loader, fail_on_undefined=True, convert_bare=True) except AnsibleUndefinedVariable as e: loop_terms = [] - display.deprecated("Skipping task due to undefined Error, in the future this will be a fatal error.") + display.deprecated("Skipping task due to undefined Error, in the future this will be a fatal error.: %s" % to_bytes(e)) items = self._shared_loader_obj.lookup_loader.get(self._task.loop, loader=self._loader, templar=templar).run(terms=loop_terms, variables=self._job_vars) else: raise AnsibleError("Unexpected failure in finding the lookup named '%s' in the available lookup plugins" % self._task.loop)