I want to use host vars from inventory for all host under a specific group
I tried with the below example but only getting IP when I am passing hostname not getting anything when trying to get ansbile_host variable value for all host under that group with the group name
ip: “{{hostvars[‘test’][‘ansible_host’]}}” ------Not working
ip: “{{hostvars[‘test1’][‘ansible_host’]}}” -------- Working