Commit 12a21d94 by James Cammarata

Merge branch 'allow_types_in_ini' of https://github.com/bcoca/ansible into bcoca-allow_types_in_ini

parents 0d81c2ec 771435de
...@@ -25,6 +25,7 @@ from ansible.inventory.expand_hosts import expand_hostname_range ...@@ -25,6 +25,7 @@ from ansible.inventory.expand_hosts import expand_hostname_range
from ansible import errors from ansible import errors
import shlex import shlex
import re import re
import ast
class InventoryParser(object): class InventoryParser(object):
""" """
...@@ -116,7 +117,7 @@ class InventoryParser(object): ...@@ -116,7 +117,7 @@ class InventoryParser(object):
(k,v) = t.split("=") (k,v) = t.split("=")
except ValueError, e: except ValueError, e:
raise errors.AnsibleError("Invalid ini entry: %s - %s" % (t, str(e))) raise errors.AnsibleError("Invalid ini entry: %s - %s" % (t, str(e)))
host.set_variable(k,v) host.set_variable(k,ast.literal_eval(v))
self.groups[active_group_name].add_host(host) self.groups[active_group_name].add_host(host)
# [southeast:children] # [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