win - Allow FQCN for win_command and win_shell

pull/68058/head
Jordan Borean 6 years ago committed by Matt Clay
parent 35996e57ab
commit f9a038cbd4

@ -64,7 +64,7 @@ class AdHocCLI(CLI):
return options return options
def _play_ds(self, pattern, async_val, poll): def _play_ds(self, pattern, async_val, poll):
check_raw = context.CLIARGS['module_name'] in ('command', 'win_command', 'shell', 'win_shell', 'script', 'raw') check_raw = context.CLIARGS['module_name'] in C.MODULE_REQUIRE_ARGS
mytask = {'action': {'module': context.CLIARGS['module_name'], 'args': parse_kv(context.CLIARGS['module_args'], check_raw=check_raw)}} mytask = {'action': {'module': context.CLIARGS['module_name'], 'args': parse_kv(context.CLIARGS['module_args'], check_raw=check_raw)}}

@ -108,8 +108,10 @@ DOCUMENTABLE_PLUGINS = CONFIGURABLE_PLUGINS + ('module', 'strategy')
IGNORE_FILES = ("COPYING", "CONTRIBUTING", "LICENSE", "README", "VERSION", "GUIDELINES") # ignore during module search IGNORE_FILES = ("COPYING", "CONTRIBUTING", "LICENSE", "README", "VERSION", "GUIDELINES") # ignore during module search
INTERNAL_RESULT_KEYS = ('add_host', 'add_group') INTERNAL_RESULT_KEYS = ('add_host', 'add_group')
LOCALHOST = ('127.0.0.1', 'localhost', '::1') LOCALHOST = ('127.0.0.1', 'localhost', '::1')
MODULE_REQUIRE_ARGS = ('command', 'win_command', 'shell', 'win_shell', 'raw', 'script') MODULE_REQUIRE_ARGS = ('command', 'win_command', 'ansible.windows.win_command', 'shell', 'win_shell',
MODULE_NO_JSON = ('command', 'win_command', 'shell', 'win_shell', 'raw') 'ansible.windows.win_shell', 'raw', 'script')
MODULE_NO_JSON = ('command', 'win_command', 'ansible.windows.win_command', 'shell', 'win_shell',
'ansible.windows.win_shell', 'raw')
RESTRICTED_RESULT_KEYS = ('ansible_rsync_path', 'ansible_playbook_python') RESTRICTED_RESULT_KEYS = ('ansible_rsync_path', 'ansible_playbook_python')
TREE_DIR = None TREE_DIR = None
VAULT_VERSION_MIN = 1.0 VAULT_VERSION_MIN = 1.0

@ -19,6 +19,7 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
import ansible.constants as C
from ansible.errors import AnsibleParserError, AnsibleError, AnsibleAssertionError from ansible.errors import AnsibleParserError, AnsibleError, AnsibleAssertionError
from ansible.module_utils.six import iteritems, string_types from ansible.module_utils.six import iteritems, string_types
from ansible.module_utils._text import to_text from ansible.module_utils._text import to_text
@ -29,14 +30,7 @@ from ansible.utils.sentinel import Sentinel
# For filtering out modules correctly below # For filtering out modules correctly below
FREEFORM_ACTIONS = frozenset(( FREEFORM_ACTIONS = frozenset(C.MODULE_REQUIRE_ARGS)
'command',
'win_command',
'shell',
'win_shell',
'script',
'raw'
))
RAW_PARAM_MODULES = FREEFORM_ACTIONS.union(( RAW_PARAM_MODULES = FREEFORM_ACTIONS.union((
'include', 'include',

Loading…
Cancel
Save