hostvars

The variables Ansible holds for each host; in a dynamic inventory's JSON they are supplied under _meta.hostvars.

In more detail

Including _meta in the output of an inventory script lets one call answer everything, instead of Ansible calling the script once per host with --host. In playbooks the special variable hostvars lets a task read another host's variables.

Related terms

Taught in

References

Certification courses