Allow end of line comments in inventory file

See github issue 2702
https://github.com/ansible/ansible/issues/2072
This commit is contained in:
Nigel Metheringham 2013-02-13 14:15:22 +00:00
commit c0e28762f0

View file

@ -109,6 +109,8 @@ class InventoryParser(object):
self.hosts[hn] = host
if len(tokens) > 1:
for t in tokens[1:]:
if t.startswith('#'):
break
(k,v) = t.split("=")
host.set_variable(k,v)
self.groups[active_group_name].add_host(host)