From 9339b0f4a7b9c2cd718e1f4e3476bbe04181f1b2 Mon Sep 17 00:00:00 2001 From: Eduardo Suarez-Santana Date: Wed, 9 Aug 2017 15:43:00 +0100 Subject: [PATCH] Fix lookup into search paths when undefined. A fileglob may issue a warning `Unable to find xxxx in expected paths` when `ansible_search_path` is not defined, because it loops over the characters in the string instead of looping over a list of one element. --- lib/ansible/plugins/lookup/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/lookup/__init__.py b/lib/ansible/plugins/lookup/__init__.py index 0b2036aaa57..16fbfd8e046 100644 --- a/lib/ansible/plugins/lookup/__init__.py +++ b/lib/ansible/plugins/lookup/__init__.py @@ -111,7 +111,7 @@ class LookupBase(with_metaclass(ABCMeta, object)): if 'ansible_search_path' in myvars: paths = myvars['ansible_search_path'] else: - paths = self.get_basedir(myvars) + paths = [self.get_basedir(myvars)] result = None try: