using groups_vars in INVENTORY

Hello comunity
I’m trying to set up “group_vars” in inventory, but for some reason it does not work.

I’ve tried with .ini and .yml files, in both I get the same error:

`

ERROR! failed to combine variables, expected dicts but got a ‘dict’ and a ‘AnsibleUnicode’:
{}

`

my ansible.conf is a default and my my file struct is:

my inventory in .ini:

`

[win-mssql]
lab-sql1.DOMAIN.cl

`

and .yml:

`

win-mssql:
hosts:
lab-sql1.e-contact.cl:

`

my archive of groups vars in ini:

`

`
ansible_user=svc-ansible-dev@DOMAIN.CL
ansible_password=PASS
ansible_port=5986
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore
ansible_winrm_transport=kerberos
ansible_winrm_service=HOST

`

`

and .yml

`

I guess the issue comes the “:” in the hostname “lab-sql1.e-contact.cl:”

The YAML parser expects a dict. If the “:” is needed then I guess you need to put double quotes around

i change and the same error appears

a couple of things:

1/ your group is called win-mssql but the file is win-mssql_.ini (with an extra underscore)
2/ don’t use .ini as an extension, those are supposed to be configuration to dynbamic scripts, and are not parsed by ansible directly
3/ group_vars files must be yaml, not ini

(attachments)

sorry the snap not updated, i using .yml extension

(attachments)

im using yml extension and error is the same

The problem is solved, ima upgrade the version of ansible