官术网_书友最值得收藏!

Inventory

An inventory is a list of hosts that are managed by Ansible. The inventory list supports classifying hosts into groups. In its simplest form, an inventory can be an INI file. The groups are represented as sections on the INI file. The classification can be based on the role of the hosts or any other system management need. It is possible to have a host appearing in multiple groups in an inventory file. The following example shows a simple inventory of hosts:

logserver1.example.com   

[controllers]
ctl1.example.com
ctl2.example.com

[computes]
compute1.example.com
compute2.example.com
compute3.example.com
compute[20:30].example.com

The inventory file supports special patterns to represent large groups of hosts.

Ansible expects to find the inventory file at /etc/ansible/hosts, but a custom location can be passed directly to the Ansible command line.

Ansible also supports dynamic inventories that can be generated by executing scripts or retrieved from another management system, such as a cloud platform.

主站蜘蛛池模板: 吴堡县| 泰宁县| 平乡县| 方城县| 于田县| 札达县| 望谟县| 彩票| 通城县| 银川市| 灵台县| 武安市| 随州市| 文成县| 大兴区| 晋宁县| 托克逊县| 吉安市| 福泉市| 察哈| 怀柔区| 东兴市| 驻马店市| 孟州市| 新竹市| 天台县| 抚顺市| 容城县| 呼图壁县| 公主岭市| 天镇县| 沈阳市| 藁城市| 合川市| 伊通| 阿坝县| 钦州市| 巩留县| 新闻| 呼伦贝尔市| 长丰县|