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
e03a724d
Commit
e03a724d
authored
May 23, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #413 from emgee/kv-equals
Allow "=" in k-v values.
parents
90c70d7c
8babac48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
+8
-1
lib/ansible/utils.py
+1
-1
test/TestUtils.py
+7
-0
No files found.
lib/ansible/utils.py
View file @
e03a724d
...
...
@@ -295,7 +295,7 @@ def parse_kv(args):
vargs
=
shlex
.
split
(
args
,
posix
=
True
)
for
x
in
vargs
:
if
x
.
find
(
"="
)
!=
-
1
:
k
,
v
=
x
.
split
(
"="
)
k
,
v
=
x
.
split
(
"="
,
1
)
options
[
k
]
=
v
return
options
...
...
test/TestUtils.py
View file @
e03a724d
...
...
@@ -235,3 +235,10 @@ class TestUtils(unittest.TestCase):
res
=
ansible
.
utils
.
template
(
template
,
vars
,
{},
no_engine
=
False
)
assert
res
==
u'hello wórld'
#####################################
### key-value parsing
def
test_parse_kv_basic
(
self
):
assert
(
ansible
.
utils
.
parse_kv
(
'a=simple b="with space" c="this=that"'
)
==
{
'a'
:
'simple'
,
'b'
:
'with space'
,
'c'
:
'this=that'
})
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