'Return the list of paths you should search for files, in order.
This follows role/playbook dependency chain.'

def get_search_path(self):

    path_stack = []
    dep_chain = self.get_dep_chain()
    if dep_chain:
        path_stack.extend(reversed([x._role_path for x in dep_chain]))
    task_dir = os.path.dirname(self.get_path())
    if (task_dir not in path_stack):
        path_stack.append(task_dir)
    return path_stack
