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
0658847e
Commit
0658847e
authored
Feb 14, 2014
by
Ilya Kuznetsov
Committed by
Ilya Kuznetsov
Feb 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow equal sign in single-line ini variables
parent
22cfef33
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
lib/ansible/inventory/ini.py
+1
-1
test/TestInventory.py
+6
-1
test/simple_hosts
+3
-0
No files found.
lib/ansible/inventory/ini.py
View file @
0658847e
...
...
@@ -119,7 +119,7 @@ class InventoryParser(object):
if
t
.
startswith
(
'#'
):
break
try
:
(
k
,
v
)
=
t
.
split
(
"="
)
(
k
,
v
)
=
t
.
split
(
"="
,
1
)
except
ValueError
,
e
:
raise
errors
.
AnsibleError
(
"Invalid ini entry:
%
s -
%
s"
%
(
t
,
str
(
e
)))
try
:
...
...
test/TestInventory.py
View file @
0658847e
...
...
@@ -55,7 +55,7 @@ class TestInventory(unittest.TestCase):
'thrudgelmir0'
,
'thrudgelmir1'
,
'thrudgelmir2'
,
'thrudgelmir3'
,
'thrudgelmir4'
,
'thrudgelmir5'
,
'Hotep-a'
,
'Hotep-b'
,
'Hotep-c'
,
'BastC'
,
'BastD'
,
]
'BastC'
,
'BastD'
,
'neptun'
,
]
#####################################
### Empty inventory format tests
...
...
@@ -401,6 +401,11 @@ class TestInventory(unittest.TestCase):
'inventory_hostname_short'
:
'zeus'
,
'group_names'
:
[
'greek'
,
'major-god'
]}
def
test_allows_equals_sign_in_var
(
self
):
inventory
=
self
.
simple_inventory
()
auth
=
inventory
.
get_variables
(
'neptun'
)[
'auth'
]
assert
auth
==
'YWRtaW46YWRtaW4='
# test disabled as needs to be updated to model desired behavior
#
#def test_dir_inventory(self):
...
...
test/simple_hosts
View file @
0658847e
...
...
@@ -17,3 +17,6 @@ loki
[egyptian]
Hotep-[a:c]
Bast[C:D]
[auth]
neptun auth="YWRtaW46YWRtaW4="
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