Content #
- groups 包含了所有Hosts文件里主机组的一个列表。
- group_names 包含了当前主机所在的所有主机组名的一个列表。
- inventory_hostname 通过Hosts文件定义主机的主机名(与ansible_home不一定相同)。
- inventory_hostname_short 变量inventory_hostname的第1部分,比如inventory_hostname的值是
books.ansible.com,那么inventory_hostname_short就是books。
- play_hosts 将执行当前任务的所有主机。
From #
Ansible权威指南