From 8737061a8f45207bfd4f0c9c8eb9514ca583603a Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Sat, 25 Jul 2015 15:38:26 +0530 Subject: [PATCH] lookupfile should lookup the given file=xxx (Earlier it used to lookup the pre-split term.) --- lib/ansible/plugins/lookup/csvfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/lookup/csvfile.py b/lib/ansible/plugins/lookup/csvfile.py index e15fd3fc36f..5052342e8a4 100644 --- a/lib/ansible/plugins/lookup/csvfile.py +++ b/lib/ansible/plugins/lookup/csvfile.py @@ -75,7 +75,7 @@ class LookupModule(LookupBase): if paramvals['delimiter'] == 'TAB': paramvals['delimiter'] = "\t" - lookupfile = self._loader.path_dwim_relative(basedir, 'files', term) + lookupfile = self._loader.path_dwim_relative(basedir, 'files', paramvals['file']) var = self.read_csv(lookupfile, key, paramvals['delimiter'], paramvals['default'], paramvals['col']) if var is not None: if type(var) is list: