From 18ac12aee60b0033d4b8af4a78ddbd55335c2991 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Yannig=20Perr=C3=A9?= <yannig.perre@gmail.com>
Date: Wed, 9 Dec 2015 22:08:30 +0100
Subject: [PATCH] Do not fail when variable is not correct in debug action. See
 https://github.com/ansible/ansible/issues/13484 for more information.

---
 lib/ansible/plugins/action/debug.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ansible/plugins/action/debug.py b/lib/ansible/plugins/action/debug.py
index 1d8e28c7a4..a0ffb71404 100644
--- a/lib/ansible/plugins/action/debug.py
+++ b/lib/ansible/plugins/action/debug.py
@@ -40,7 +40,7 @@ class ActionModule(ActionBase):
                 result['msg'] = self._task.args['msg']
         # FIXME: move the LOOKUP_REGEX somewhere else
         elif 'var' in self._task.args: # and not utils.LOOKUP_REGEX.search(self._task.args['var']):
-            results = self._templar.template(self._task.args['var'], convert_bare=True)
+            results = self._templar.template(self._task.args['var'], convert_bare=True, fail_on_undefined=False)
             if type(self._task.args['var']) in (list, dict):
                 # If var is a list or dict, use the type as key to display
                 result[to_unicode(type(self._task.args['var']))] = results