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

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.

主站蜘蛛池模板: 建阳市| 琼结县| 阿拉尔市| 临夏市| 洛川县| 绥江县| 东莞市| 厦门市| 汶上县| 新兴县| 建水县| 伊吾县| 宁城县| 甘德县| 太白县| 普格县| 屏南县| 锡林浩特市| 新竹县| 无极县| 石嘴山市| 屯门区| 定日县| 泾阳县| 门头沟区| 孝义市| 屯留县| 康马县| 车致| 绵竹市| 张家港市| 石阡县| 耿马| 东山县| 阿拉尔市| 乐平市| 济源市| 禄劝| 门源| 陇西县| 历史|