Commit f04041b3 by Jeroen Hoekx

Ignore port numbers in simple inventory format

parent 746f1b92
...@@ -105,6 +105,9 @@ class Inventory(object): ...@@ -105,6 +105,9 @@ class Inventory(object):
groups[group_name] = [] groups[group_name] = []
elif item != "": elif item != "":
# looks like a regular host # looks like a regular host
if ":" in item:
# a port was specified
item, port = item.split(":")
groups[group_name].append(item) groups[group_name].append(item)
if not item in results: if not item in results:
results.append(item) results.append(item)
......
...@@ -3,7 +3,7 @@ saturn ...@@ -3,7 +3,7 @@ saturn
[greek] [greek]
zeus zeus
hera hera:3000
poseidon poseidon
[norse] [norse]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment