|
|
@ -17,9 +17,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
from ansible import errors
|
|
|
|
from ansible import errors
|
|
|
|
from ansible import utils
|
|
|
|
from ansible import utils
|
|
|
|
import ansible.constants as C
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
from os import pathsep
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Task(object):
|
|
|
|
class Task(object):
|
|
|
@ -44,14 +41,8 @@ class Task(object):
|
|
|
|
''' constructor loads from a task or handler datastructure '''
|
|
|
|
''' constructor loads from a task or handler datastructure '''
|
|
|
|
|
|
|
|
|
|
|
|
# code to allow for saying "modulename: args" versus "action: modulename args"
|
|
|
|
# code to allow for saying "modulename: args" versus "action: modulename args"
|
|
|
|
|
|
|
|
|
|
|
|
modules_list = set()
|
|
|
|
|
|
|
|
for path in C.DEFAULT_MODULE_PATH.split(pathsep):
|
|
|
|
|
|
|
|
if os.path.exists(path):
|
|
|
|
|
|
|
|
modules_list.update(os.listdir(path))
|
|
|
|
|
|
|
|
modules_list = list(modules_list)
|
|
|
|
|
|
|
|
for x in ds.keys():
|
|
|
|
for x in ds.keys():
|
|
|
|
if x in modules_list:
|
|
|
|
if x in play.playbook.modules_list:
|
|
|
|
ds['action'] = x + " " + ds.get(x, None)
|
|
|
|
ds['action'] = x + " " + ds.get(x, None)
|
|
|
|
ds.pop(x)
|
|
|
|
ds.pop(x)
|
|
|
|
elif not x in Task.VALID_KEYS:
|
|
|
|
elif not x in Task.VALID_KEYS:
|
|
|
|