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

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.

主站蜘蛛池模板: 文安县| 邛崃市| 安溪县| 云南省| 井陉县| 龙江县| 奇台县| 湛江市| 马龙县| 腾冲县| 通化市| 濉溪县| 济源市| 永德县| 汪清县| 龙山县| 板桥市| 蒲江县| 娄烦县| 元朗区| 汨罗市| 娱乐| 丹东市| 神木县| 百色市| 惠来县| 平武县| 阳江市| 襄垣县| 双流县| 农安县| 临夏市| 蒙山县| 广安市| 平陆县| 新绛县| 绥德县| 海淀区| 苏州市| 济宁市| 自治县|