mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
First swing at making module_common.py more v2-ish
This commit is contained in:
parent
0e834509c8
commit
01a6081b49
5 changed files with 134 additions and 128 deletions
|
@ -34,8 +34,9 @@ import os
|
|||
import subprocess
|
||||
import traceback
|
||||
import optparse
|
||||
import ansible.utils as utils
|
||||
import ansible.module_common as module_common
|
||||
|
||||
from ansible import utils
|
||||
from ansible import module_common
|
||||
import ansible.constants as C
|
||||
|
||||
try:
|
||||
|
@ -87,8 +88,6 @@ def boilerplate_module(modfile, args, interpreter, check):
|
|||
#module_data = module_fh.read()
|
||||
#module_fh.close()
|
||||
|
||||
replacer = module_common.ModuleReplacer()
|
||||
|
||||
#included_boilerplate = module_data.find(module_common.REPLACER) != -1 or module_data.find("import ansible.module_utils") != -1
|
||||
|
||||
complex_args = {}
|
||||
|
@ -116,7 +115,7 @@ def boilerplate_module(modfile, args, interpreter, check):
|
|||
if check:
|
||||
complex_args['CHECKMODE'] = True
|
||||
|
||||
(module_data, module_style, shebang) = replacer.modify_module(
|
||||
(module_data, module_style, shebang) = module_common.modify_module(
|
||||
modfile,
|
||||
complex_args,
|
||||
args,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue