HELP using group_vars and roles

I have a question about the use of group_vars in Ansible. I would like to use the data dictionaries values from swtich.json, I also need it to be global set of values almost like all. When I call it in Ansible it becomes unknown... Is there a way to do it?

Ansible debug output:
TASK [basebmc : debug] *********************************************************
task path: /mnt/c/Users/emarq/Documents/Source/Repos/Solutions.Network.Automation/MAS/Ansible/hpe/roles/basebmc/tasks/main.yml:20
fatal: [b43-1u15-d00-5900AFbmc]: FAILED! => {
    "failed": true,
    "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: dict object has no element 5900\n\nThe error appears to have been in '/mnt/c/Users/emarq/Documents/Source/Repos/Solutions.Network.Automation/MAS/Ansible/hpe/roles/basebmc/tasks/main.yml': line 20, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- debug:\n ^ here\n"
}

group_vars/
baseagg.yml basebmc.yml basetor.yml switch.json

Ansible.hosts:
[swtich:children]
  basebmc
[basebmc]
  bmcdevice1

Role baesbmc/tasks/main.yml:
- debug:
    msg: "name: {{ inventory_hostname }} {{ portmap.HPE.5900.Port.46.Port }}"
    verbosity: 4
  with_dict: "{{ portmap }}"

playbook.yml

try:
msg: “name: {{ inventory_hostname }} {{ portmap[‘HPE’][‘5900’][‘Port’][‘46’][‘Port’] }}”

I updated my msg to the following.

Your output does not seem to match what you are saying: {{ portmap.HPE.5900.Port.46.Type }}

This is very odd, when I replace 5900 with FOO, it works. What’s special about the number 5900?

TASK [basebmc : debug] *********************************************************

task path: /mnt/c/Users/emarq/Documents/Source/Repos/Solutions.Network.Automation/MAS/Ansible/hpe/roles/basebmc/tasks/main.yml:20

ok: [b43-1u15-d00-5900AFbmc] => {

“msg”: “name:portmap[HPE][FOO][Port][46][Port]: 1/0/46”

}

string vs number

x[21] is not the same as x[‘21’]

That was it. Thanks for the help.