mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge branch 'better_ini_errors2' of git://github.com/bcoca/ansible into devel
This commit is contained in:
commit
ee11d69697
1 changed files with 4 additions and 1 deletions
|
@ -112,7 +112,10 @@ class InventoryParser(object):
|
||||||
for t in tokens[1:]:
|
for t in tokens[1:]:
|
||||||
if t.startswith('#'):
|
if t.startswith('#'):
|
||||||
break
|
break
|
||||||
(k,v) = t.split("=")
|
try:
|
||||||
|
(k,v) = t.split("=")
|
||||||
|
except ValueError, e:
|
||||||
|
raise errors.AnsibleError("Invalid ini entry: %s - %s" % (t, str(e)))
|
||||||
host.set_variable(k,v)
|
host.set_variable(k,v)
|
||||||
self.groups[active_group_name].add_host(host)
|
self.groups[active_group_name].add_host(host)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue