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

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.

主站蜘蛛池模板: 六盘水市| 威海市| 兴仁县| 缙云县| 大连市| 凤冈县| 慈利县| 图木舒克市| 龙山县| 大悟县| 得荣县| 兰西县| 石嘴山市| 会昌县| 临朐县| 常德市| 富川| 西丰县| 泰宁县| 盐山县| 永靖县| 铜山县| 周至县| 梅州市| 顺昌县| 崇礼县| 阿拉尔市| 措勤县| 余干县| 绥中县| 临清市| 中卫市| 庄河市| 乡宁县| 山丹县| 建水县| 正宁县| 开化县| 高青县| 锦屏县| 马公市|