mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 04:41:26 -07:00
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:
parent
138b45e32f
commit
f6a4c20cc0
3 changed files with 20 additions and 24 deletions
|
@ -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' ]
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue