Commit bff47df5 by James Cammarata

Fix issue with ast evaluation of strings

parent 5b205ae8
......@@ -117,7 +117,12 @@ class InventoryParser(object):
(k,v) = t.split("=")
except ValueError, e:
raise errors.AnsibleError("Invalid ini entry: %s - %s" % (t, str(e)))
host.set_variable(k,ast.literal_eval(v))
try:
host.set_variable(k,ast.literal_eval(v))
except:
# most likely a string that literal_eval
# doesn't like, so just set it
host.set_variable(k,v)
self.groups[active_group_name].add_host(host)
# [southeast:children]
......
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