Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
6969b5ac
Commit
6969b5ac
authored
Aug 02, 2015
by
Chris Church
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure raw doesn't eat key=value arguments.
parent
cf35bdbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
lib/ansible/parsing/mod_args.py
+2
-2
test/integration/roles/test_win_raw/tasks/main.yml
+9
-0
No files found.
lib/ansible/parsing/mod_args.py
View file @
6969b5ac
...
...
@@ -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
:
...
...
test/integration/roles/test_win_raw/tasks/main.yml
View file @
6969b5ac
...
...
@@ -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'"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment