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
f04041b3
Commit
f04041b3
authored
Apr 14, 2012
by
Jeroen Hoekx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore port numbers in simple inventory format
parent
746f1b92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
lib/ansible/inventory.py
+3
-0
test/simple_hosts
+1
-1
No files found.
lib/ansible/inventory.py
View file @
f04041b3
...
...
@@ -105,6 +105,9 @@ class Inventory(object):
groups
[
group_name
]
=
[]
elif
item
!=
""
:
# looks like a regular host
if
":"
in
item
:
# a port was specified
item
,
port
=
item
.
split
(
":"
)
groups
[
group_name
]
.
append
(
item
)
if
not
item
in
results
:
results
.
append
(
item
)
...
...
test/simple_hosts
View file @
f04041b3
...
...
@@ -3,7 +3,7 @@ saturn
[greek]
zeus
hera
hera
:3000
poseidon
[norse]
...
...
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