diff --git a/lib/ansible/inventory/ini.py b/lib/ansible/inventory/ini.py index a5da9155727..d79a1488943 100644 --- a/lib/ansible/inventory/ini.py +++ b/lib/ansible/inventory/ini.py @@ -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)