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

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.

主站蜘蛛池模板: 文山县| 邢台市| 黄浦区| 济南市| 台湾省| 原平市| 呼玛县| 普安县| 临高县| 万载县| 西贡区| 安新县| 青铜峡市| 前郭尔| 常德市| 西昌市| 台前县| 金山区| 镇巴县| 张家界市| 广水市| 罗源县| 天水市| 慈溪市| 达日县| 社旗县| 南充市| 盖州市| 肇庆市| 灵台县| 静安区| 额济纳旗| 墨竹工卡县| 仪征市| 宁明县| 仁布县| 刚察县| 扎兰屯市| 通化县| 阳泉市| 邮箱|