How to iterate through a variable inventary?

Recall. how to iterate through a variable inventories?
right now doing so here in such inventories
{% for host in groups['all'] %}
 - targets: ['{{ host }}:9273']
 stage_name: "{{ host }}"

[linux servers]
awesome1 ansible_host= ansible_private_ip=
awesome2 ansible_host= ansible_private_ip=
awesome3 ansible_host= ansible_private_ip=

but it shows hostname (awesome) and I need ansible_private_ip

I'm not sure how this is done, recall pliz who knows
April 19th 20 at 12:44
1 answer
April 19th 20 at 12:46
irrelevant, found
- targets: ['{{ hostvars[host].ansible_private_ip }}:9273']

Find more questions by tags Ansible