|
|
@ -37,7 +37,7 @@ import optparse
|
|
|
|
import ansible.utils as utils
|
|
|
|
import ansible.utils as utils
|
|
|
|
from ansible.parsing.utils.jsonify import jsonify
|
|
|
|
from ansible.parsing.utils.jsonify import jsonify
|
|
|
|
from ansible.parsing.splitter import parse_kv
|
|
|
|
from ansible.parsing.splitter import parse_kv
|
|
|
|
import ansible.module_common as module_common
|
|
|
|
import ansible.executor.module_common as module_common
|
|
|
|
import ansible.constants as C
|
|
|
|
import ansible.constants as C
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
@ -90,7 +90,7 @@ def boilerplate_module(modfile, args, interpreter, check):
|
|
|
|
#module_data = module_fh.read()
|
|
|
|
#module_data = module_fh.read()
|
|
|
|
#module_fh.close()
|
|
|
|
#module_fh.close()
|
|
|
|
|
|
|
|
|
|
|
|
replacer = module_common.ModuleReplacer()
|
|
|
|
#replacer = module_common.ModuleReplacer()
|
|
|
|
|
|
|
|
|
|
|
|
#included_boilerplate = module_data.find(module_common.REPLACER) != -1 or module_data.find("import ansible.module_utils") != -1
|
|
|
|
#included_boilerplate = module_data.find(module_common.REPLACER) != -1 or module_data.find("import ansible.module_utils") != -1
|
|
|
|
|
|
|
|
|
|
|
@ -119,7 +119,7 @@ def boilerplate_module(modfile, args, interpreter, check):
|
|
|
|
if check:
|
|
|
|
if check:
|
|
|
|
complex_args['CHECKMODE'] = True
|
|
|
|
complex_args['CHECKMODE'] = True
|
|
|
|
|
|
|
|
|
|
|
|
(module_data, module_style, shebang) = replacer.modify_module(
|
|
|
|
(module_data, module_style, shebang) = module_common.modify_module(
|
|
|
|
modfile,
|
|
|
|
modfile,
|
|
|
|
complex_args,
|
|
|
|
complex_args,
|
|
|
|
args,
|
|
|
|
args,
|
|
|
|