Make parsing variables for hosts and groups more consistent

This commit allows to specify arrays in [group:vars] block.

Signed-off-by: Oleg Bulatov <oleg@bulatov.me>
This commit is contained in:
Oleg Bulatov 2014-03-16 21:47:26 +04:00
parent 138b45e32f
commit f6a4c20cc0
3 changed files with 20 additions and 24 deletions

View file

@ -236,9 +236,10 @@ class TestInventory(unittest.TestCase):
print vars
expected = dict(
a='1', b='2', c='3', d='10002', e='10003', f='10004 != 10005',
a=1, b=2, c=3, d=10002, e=10003, f='10004 != 10005',
g=' g ', h=' h ', i="' i \"", j='" j',
rga='1', rgb='2', rgc='3',
k=[ 'k1', 'k2' ],
rga=1, rgb=2, rgc=3,
inventory_hostname='rtp_a', inventory_hostname_short='rtp_a',
group_names=[ 'eastcoast', 'nc', 'redundantgroup', 'redundantgroup2', 'redundantgroup3', 'rtp', 'us' ]
)