From d3b57a2f9c8e816177fe97937a7c50932835fe6b Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Wed, 15 Feb 2017 20:38:57 -0500 Subject: [PATCH] more cleanup from net_command module that is abandoned for 2.3 (#21497) --- lib/ansible/constants.py | 4 ++-- lib/ansible/parsing/mod_args.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index 29d2ec1acf9..dc5d5dcb815 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -386,8 +386,8 @@ DIFF_CONTEXT = get_config(p, 'diff', 'context', 'ANSIBLE_DIFF_CONTEXT', 3, value DIFF_ALWAYS = get_config(p, 'diff', 'always', 'ANSIBLE_DIFF_ALWAYS', False, value_type='bool') # non-configurable things -MODULE_REQUIRE_ARGS = ['command', 'win_command', 'net_command', 'shell', 'win_shell', 'raw', 'script'] -MODULE_NO_JSON = ['command', 'win_command', 'net_command', 'shell', 'win_shell', 'raw'] +MODULE_REQUIRE_ARGS = ['command', 'win_command', 'shell', 'win_shell', 'raw', 'script'] +MODULE_NO_JSON = ['command', 'win_command', 'shell', 'win_shell', 'raw'] DEFAULT_BECOME_PASS = None DEFAULT_PASSWORD_CHARS = to_text(ascii_letters + digits + ".,:-_", errors='strict') # characters included in auto-generated passwords DEFAULT_SUDO_PASS = None diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py index 2266d9e3359..73f659658c2 100644 --- a/lib/ansible/parsing/mod_args.py +++ b/lib/ansible/parsing/mod_args.py @@ -31,7 +31,6 @@ from ansible.template import Templar RAW_PARAM_MODULES = ([ 'command', 'win_command', - 'net_command', 'shell', 'win_shell', 'script', @@ -165,7 +164,7 @@ class ModuleArgsParser: # only internal variables can start with an underscore, so # we don't allow users to set them directy in arguments - if args and action not in ('command', 'net_command', 'win_command', 'shell', 'win_shell', 'script', 'raw'): + if args and action not in ('command', 'win_command', 'shell', 'win_shell', 'script', 'raw'): for arg in args: arg = to_text(arg) if arg.startswith('_ansible_'): @@ -196,7 +195,7 @@ class ModuleArgsParser: args = thing elif isinstance(thing, string_types): # form is like: copy: src=a dest=b - check_raw = action in ('command', 'net_command', 'win_command', 'shell', 'win_shell', 'script', 'raw') + check_raw = action in ('command', 'win_command', 'shell', 'win_shell', 'script', 'raw') args = parse_kv(thing, check_raw=check_raw) elif thing is None: # this can happen with modules which take no params, like ping: