From 0bd6f3a5e8ff0c1534cc63e0f0bc8fef5f9dbf85 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 1 Apr 2016 18:05:46 -0400 Subject: [PATCH] correctly adds searchpath as list --- lib/ansible/plugins/lookup/template.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/lookup/template.py b/lib/ansible/plugins/lookup/template.py index 3f452a11980..30385f9de0a 100644 --- a/lib/ansible/plugins/lookup/template.py +++ b/lib/ansible/plugins/lookup/template.py @@ -51,7 +51,8 @@ class LookupModule(LookupBase): searchpath = [self._loader._basedir, os.path.dirname(lookupfile)] if 'role_path' in variables: - searchpath.insert(1, C.DEFAULT_ROLES_PATH) + if C.DEFAULT_ROLES_PATH: + searchpath[:0] = C.DEFAULT_ROLES_PATH searchpath.insert(1, variables['role_path']) self._templar.environment.loader.searchpath = searchpath