Inconsistent variables parser for ini inventory

Hi!

I found that variables for hosts and for groups in the ini file are handled differently:
https://github.com/ansible/ansible/blob/devel/lib/ansible/inventory/ini.py#L127-L140
https://github.com/ansible/ansible/blob/devel/lib/ansible/inventory/ini.py#L196-L201

It would be nice to extract the method from the first block, and reuse it in the second.

This change will allow to define arrays in […:vars] block:

[groupname]
example.com targets=“[‘aaa’, ‘bbb’, ‘ccc’]” # this is array

[groupname]
example.com
[groupname:vars]
targets=[‘aaa’, ‘bbb’, ‘ccc’] # for now, this is string

Are there any reasons to keep this behaviour?

I believe I commented on a pull request already that I’m ok supporting this, though I’d still prefer to see folks use group_vars/ and host_vars/ to simplify their main inventory most of the time.