From bcf7a2c53a18aaf6f65bff80b69df0a6ec398716 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Wed, 27 Feb 2013 10:08:45 +0100 Subject: [PATCH] Catch all exceptions coming from lookup plugins Fixes using $TEMPLATE() and hostvars in a task without a name, among other things. --- lib/ansible/utils/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/utils/template.py b/lib/ansible/utils/template.py index 6401c33a362..2fefe9bd7aa 100644 --- a/lib/ansible/utils/template.py +++ b/lib/ansible/utils/template.py @@ -175,7 +175,7 @@ def _varFind(basedir, text, vars, lookup_fatal, depth, expand_lists): replacement = instance.run(args, inject=vars) if expand_lists: replacement = u",".join([unicode(x) for x in replacement]) - except errors.AnsibleError: + except: if not lookup_fatal: replacement = None else: