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
ff44c981
Commit
ff44c981
authored
Aug 06, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3770 from rishid/devel
Add support for INI comments that begin with '#' or ';'
parents
99775176
d18c90ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/ansible/inventory/ini.py
+3
-3
No files found.
lib/ansible/inventory/ini.py
View file @
ff44c981
...
...
@@ -75,7 +75,7 @@ class InventoryParser(object):
elif
active_group_name
not
in
self
.
groups
:
new_group
=
self
.
groups
[
active_group_name
]
=
Group
(
name
=
active_group_name
)
all
.
add_child_group
(
new_group
)
elif
line
.
startswith
(
"#"
)
or
line
==
''
:
elif
line
.
startswith
(
"#"
)
or
line
.
startswith
(
";"
)
or
line
==
''
:
pass
elif
active_group_name
:
tokens
=
shlex
.
split
(
line
.
split
(
" #"
)[
0
])
...
...
@@ -132,7 +132,7 @@ class InventoryParser(object):
group
=
self
.
groups
.
get
(
line
,
None
)
if
group
is
None
:
group
=
self
.
groups
[
line
]
=
Group
(
name
=
line
)
elif
line
.
startswith
(
"#"
):
elif
line
.
startswith
(
"#"
)
or
line
.
startswith
(
";"
)
:
pass
elif
line
.
startswith
(
"["
):
group
=
None
...
...
@@ -157,7 +157,7 @@ class InventoryParser(object):
group
=
self
.
groups
.
get
(
line
,
None
)
if
group
is
None
:
raise
errors
.
AnsibleError
(
"can't add vars to undefined group:
%
s"
%
line
)
elif
line
.
startswith
(
"#"
):
elif
line
.
startswith
(
"#"
)
or
line
.
startswith
(
";"
)
:
pass
elif
line
.
startswith
(
"["
):
group
=
None
...
...
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