summaryrefslogtreecommitdiff
path: root/lib/ansible
diff options
context:
space:
mode:
authorJordan Borean <jborean93@gmail.com>2020-03-04 09:59:51 +1000
committerMatt Clay <matt@mystile.com>2020-03-05 12:14:58 -0800
commitf9a038cbd4f3b926f8b2bc41a2bf720982139e66 (patch)
treeefe395a8fd405eb13f1fb5fa1ce142b69c9e0e7e /lib/ansible
parent35996e57abba1f40abb493379d5cbe2dd90e65c3 (diff)
downloadansible-f9a038cbd4f3b926f8b2bc41a2bf720982139e66.tar.gz
win - Allow FQCN for win_command and win_shell
Diffstat (limited to 'lib/ansible')
-rw-r--r--lib/ansible/cli/adhoc.py2
-rw-r--r--lib/ansible/constants.py6
-rw-r--r--lib/ansible/parsing/mod_args.py10
3 files changed, 7 insertions, 11 deletions
diff --git a/lib/ansible/cli/adhoc.py b/lib/ansible/cli/adhoc.py
index 9d91b2934f..3b984f01ff 100644
--- a/lib/ansible/cli/adhoc.py
+++ b/lib/ansible/cli/adhoc.py
@@ -64,7 +64,7 @@ class AdHocCLI(CLI):
return options
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)}}
diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py
index 613c94ef6b..3711e60f28 100644
--- a/lib/ansible/constants.py
+++ b/lib/ansible/constants.py
@@ -108,8 +108,10 @@ DOCUMENTABLE_PLUGINS = CONFIGURABLE_PLUGINS + ('module', 'strategy')
IGNORE_FILES = ("COPYING", "CONTRIBUTING", "LICENSE", "README", "VERSION", "GUIDELINES") # ignore during module search
INTERNAL_RESULT_KEYS = ('add_host', 'add_group')
LOCALHOST = ('127.0.0.1', 'localhost', '::1')
-MODULE_REQUIRE_ARGS = ('command', 'win_command', 'shell', 'win_shell', 'raw', 'script')
-MODULE_NO_JSON = ('command', 'win_command', 'shell', 'win_shell', 'raw')
+MODULE_REQUIRE_ARGS = ('command', 'win_command', 'ansible.windows.win_command', 'shell', 'win_shell',
+ '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')
TREE_DIR = None
VAULT_VERSION_MIN = 1.0
diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py
index e01eb7b8c5..929d1add9e 100644
--- a/lib/ansible/parsing/mod_args.py
+++ b/lib/ansible/parsing/mod_args.py
@@ -19,6 +19,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
+import ansible.constants as C
from ansible.errors import AnsibleParserError, AnsibleError, AnsibleAssertionError
from ansible.module_utils.six import iteritems, string_types
from ansible.module_utils._text import to_text
@@ -29,14 +30,7 @@ from ansible.utils.sentinel import Sentinel
# For filtering out modules correctly below
-FREEFORM_ACTIONS = frozenset((
- 'command',
- 'win_command',
- 'shell',
- 'win_shell',
- 'script',
- 'raw'
-))
+FREEFORM_ACTIONS = frozenset(C.MODULE_REQUIRE_ARGS)
RAW_PARAM_MODULES = FREEFORM_ACTIONS.union((
'include',