1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Allow modules in a "./library" directory to be referenced by their shortforms "modulename:" instead of just "action: modulename"

This commit is contained in:
Michael DeHaan 2013-04-28 21:05:19 -04:00
parent e90023281d
commit 7117ca5395

View file

@ -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"