From 70d024ffce317d6fffe5ddce28985ab266f0b72e Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 12 Aug 2015 22:39:06 -0400 Subject: [PATCH] show errors when missing vars file or when there is syntax issue in the file fixes #11945 --- lib/ansible/vars/__init__.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/ansible/vars/__init__.py b/lib/ansible/vars/__init__.py index d3cff147ea..c3cb698fbf 100644 --- a/lib/ansible/vars/__init__.py +++ b/lib/ansible/vars/__init__.py @@ -190,7 +190,7 @@ class VariableManager: if play: all_vars = self._combine_vars(all_vars, play.get_vars()) - + for vars_file_item in play.get_vars_files(): try: # create a set of temporary vars here, which incorporate the @@ -215,11 +215,6 @@ class VariableManager: break else: raise AnsibleError("vars file %s was not found" % vars_file_item) - except AnsibleError, e: - # FIXME: get_vars should probably be taking a flag to determine - # whether or not vars files errors should be fatal at this - # stage, or just base it on whether a host was specified? - pass except UndefinedError, e: continue