mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #11835 from cchurch/raw_is_not_raw_enough
Raw is not raw enough
This commit is contained in:
commit
f6d1b5e233
2 changed files with 11 additions and 2 deletions
|
@ -181,7 +181,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')
|
||||
check_raw = action in ('command', '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:
|
||||
|
@ -218,7 +218,7 @@ class ModuleArgsParser:
|
|||
elif isinstance(thing, string_types):
|
||||
# form is like: copy: src=a dest=b ... common shorthand throughout ansible
|
||||
(action, args) = self._split_module_string(thing)
|
||||
check_raw = action in ('command', 'shell', 'script')
|
||||
check_raw = action in ('command', 'shell', 'script', 'raw')
|
||||
args = parse_kv(args, check_raw=check_raw)
|
||||
|
||||
else:
|
||||
|
|
|
@ -83,3 +83,12 @@
|
|||
- "not sleep_command.stderr"
|
||||
- "not sleep_command|failed"
|
||||
- "not sleep_command|changed"
|
||||
|
||||
- name: run a raw command with key=value arguments
|
||||
raw: echo wwe=raw
|
||||
register: raw_result
|
||||
|
||||
- name: make sure raw is really raw and not removing key=value arguments
|
||||
assert:
|
||||
that:
|
||||
- "raw_result.stdout_lines[0] == 'wwe=raw'"
|
||||
|
|
Loading…
Reference in a new issue