From 5347db2952c8c51d16843f35f9810c3e594519c8 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 20 Jul 2015 14:47:38 -0400 Subject: [PATCH] Also check the play basedir for the role Fixes #11328 --- lib/ansible/playbook/role/definition.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ansible/playbook/role/definition.py b/lib/ansible/playbook/role/definition.py index 1cd84ff7784..940c1736c96 100644 --- a/lib/ansible/playbook/role/definition.py +++ b/lib/ansible/playbook/role/definition.py @@ -129,7 +129,12 @@ class RoleDefinition(Base, Become, Conditional, Taggable): return (role_name, role_path) else: # we always start the search for roles in the base directory of the playbook - role_search_paths = [os.path.join(self._loader.get_basedir(), u'roles'), u'./roles', u'./'] + role_search_paths = [ + os.path.join(self._loader.get_basedir(), u'roles'), + u'./roles', + self._loader.get_basedir(), + u'./' + ] # also search in the configured roles path if C.DEFAULT_ROLES_PATH: