FreeKB - Ansible inventory_hostname_short magic variable
www.freekb.net/Article?id=242820.07.2021 · Ansible - inventory_hostname_short magic variable There are a number of different magic variable will return the hostname of a managed node. ansible_hostname will return the hostname of a managed node from facts ansible_play_batch will return the hostname of a managed node, just like the Linux hostname command, in the form of an array of strings.
Special Variables — Ansible Documentation
docs.ansible.com › ansible › latestDec 21, 2021 · A dictionary/map with all the groups in inventory and each group has the list of hosts that belong to it. hostvars. A dictionary/map with all the hosts in inventory and variables assigned to them. inventory_hostname. The inventory name for the ‘current’ host being iterated over in the play. inventory_hostname_short. The short version of ...
FreeKB - Ansible inventory_hostname_short magic variable
www.freekb.net › ArticleJul 20, 2021 · ansible_limit will return the hostname passed to the -l or --limit command line option. inventory_hostname will return the hostname of a manage node as listed in your default hosts file or your own inventory file. inventory_hostname_short will return the short hostname of a manage node as listed in your default hosts file or your own inventory ...