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

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.

主站蜘蛛池模板: 崇文区| 千阳县| 镇巴县| 昌都县| 通江县| 伊金霍洛旗| 天津市| 新建县| 合水县| 明水县| 宜良县| 舟曲县| 额尔古纳市| 广德县| 永福县| 会泽县| 大关县| 宁陕县| 星座| 五大连池市| 怀化市| 张家界市| 梁河县| 电白县| 大冶市| 始兴县| 汕尾市| 福建省| 棋牌| 洛阳市| 南城县| 香港| 长白| 天津市| 临澧县| 丰顺县| 阿合奇县| 思茅市| 安西县| 勐海县| 汉沽区|