diff --git a/lib/ansible/playbook/task.py b/lib/ansible/playbook/task.py index af297b9f3a..45dde4466a 100644 --- a/lib/ansible/playbook/task.py +++ b/lib/ansible/playbook/task.py @@ -17,6 +17,7 @@ from ansible import errors from ansible import utils +import os import ansible.utils.template as template class Task(object): @@ -53,6 +54,11 @@ class Task(object): else: self.meta = None + + library = os.path.join(play.basedir, 'library') + if os.path.exists(library): + utils.plugins.module_finder.add_directory(library) + for x in ds.keys(): # code to allow for saying "modulename: args" versus "action: modulename args"