From db5d3f03a9489481950dccf0a9512256eb273ff3 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 9 Nov 2015 13:46:01 -0800 Subject: [PATCH] Fix first_found not finding files in roles (only templates) --- lib/ansible/plugins/lookup/first_found.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ansible/plugins/lookup/first_found.py b/lib/ansible/plugins/lookup/first_found.py index 6e0aaee117a..915363180d2 100644 --- a/lib/ansible/plugins/lookup/first_found.py +++ b/lib/ansible/plugins/lookup/first_found.py @@ -185,14 +185,13 @@ class LookupModule(LookupBase): else: if roledir is not None: # check the templates and vars directories too,if they exist - for subdir in ('templates', 'vars'): + for subdir in ('templates', 'vars', 'files'): path = self._loader.path_dwim_relative(roledir, subdir, fn) if os.path.exists(path): return [path] # if none of the above were found, just check the - # current filename against the basedir (this will already - # have ../files from runner, if it's a role task + # current filename against the current dir path = self._loader.path_dwim(fn) if os.path.exists(path): return [path]