From f497d771c8bda7874382bbffbf641eaedf015f94 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Thu, 15 Sep 2016 11:25:56 -0700 Subject: win_shell/win_command changes + tests (#17557) --- lib/ansible/parsing/mod_args.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/ansible/parsing/mod_args.py') diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py index dbe85b0bad..a311156ae9 100644 --- a/lib/ansible/parsing/mod_args.py +++ b/lib/ansible/parsing/mod_args.py @@ -29,7 +29,9 @@ from ansible.template import Templar # For filtering out modules correctly below RAW_PARAM_MODULES = ([ 'command', + 'win_command', 'shell', + 'win_shell', 'script', 'include', 'include_vars', @@ -161,7 +163,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', 'shell', 'script', 'raw'): + if args and action not in ('command', 'win_command', 'shell', 'win_shell', 'script', 'raw'): for arg in args: if arg.startswith('_ansible_'): raise AnsibleError("invalid parameter specified for action '%s': '%s'" % (action, arg)) @@ -191,7 +193,7 @@ class ModuleArgsParser: args = thing elif isinstance(thing, string_types): # form is like: local_action: copy src=a dest=b ... pretty common - check_raw = action in ('command', '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: @@ -217,7 +219,7 @@ class ModuleArgsParser: action = None args = None - actions_allowing_raw = ('command', 'shell', 'script', 'raw') + actions_allowing_raw = ('command', 'win_command', 'shell', 'win_shell', 'script', 'raw') if isinstance(thing, dict): # form is like: copy: { src: 'a', dest: 'b' } ... common for structured (aka "complex") args thing = thing.copy() -- cgit v1.2.1