mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
now ini vars are typed
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
parent
0ee236bf57
commit
771435deb4
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@ from ansible.inventory.expand_hosts import expand_hostname_range
|
|||
from ansible import errors
|
||||
import shlex
|
||||
import re
|
||||
import ast
|
||||
|
||||
class InventoryParser(object):
|
||||
"""
|
||||
|
@ -116,7 +117,7 @@ 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,v)
|
||||
host.set_variable(k,ast.literal_eval(v))
|
||||
self.groups[active_group_name].add_host(host)
|
||||
|
||||
# [southeast:children]
|
||||
|
|
Loading…
Reference in a new issue