'the \'role\', as specified in the ds (or as a bare string), can either
be a simple name or a full path. If it is a full path, we use the
basename as the role name, otherwise we take the name as-given and
append it to the default role path'

def _load_role_path(self, role_name):

    role_search_paths = [os.path.join(self._loader.get_basedir(), u'roles')]
    if C.DEFAULT_ROLES_PATH:
        role_search_paths.extend(C.DEFAULT_ROLES_PATH)
    if self._role_basedir:
        role_search_paths.append(self._role_basedir)
    role_search_paths.append(self._loader.get_basedir())
    if (self._variable_manager is not None):
        all_vars = self._variable_manager.get_vars(play=self._play)
    else:
        all_vars = dict()
    templar = Templar(loader=self._loader, variables=all_vars)
    role_name = templar.template(role_name)
    for path in role_search_paths:
        path = templar.template(path)
        role_path = unfrackpath(os.path.join(path, role_name))
        if self._loader.path_exists(role_path):
            return (role_name, role_path)
    role_path = unfrackpath(role_name)
    if self._loader.path_exists(role_path):
        role_name = os.path.basename(role_name)
        return (role_name, role_path)
    raise AnsibleError(("the    role    '%s'    was    not    found    in    %s" % (role_name, ':'.join(role_search_paths))), obj=self._ds)
