Commit 7117ca53 by Michael DeHaan

Allow modules in a "./library" directory to be referenced by their shortforms…

Allow modules in a "./library" directory to be referenced by their shortforms "modulename:" instead of just "action: modulename"
parent e9002328
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
from ansible import errors from ansible import errors
from ansible import utils from ansible import utils
import os
import ansible.utils.template as template import ansible.utils.template as template
class Task(object): class Task(object):
...@@ -53,6 +54,11 @@ class Task(object): ...@@ -53,6 +54,11 @@ class Task(object):
else: else:
self.meta = None 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(): for x in ds.keys():
# code to allow for saying "modulename: args" versus "action: modulename args" # code to allow for saying "modulename: args" versus "action: modulename args"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment