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

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.

主站蜘蛛池模板: 新疆| 玉龙| 苍溪县| 崇文区| 西充县| 达拉特旗| 海城市| 陇西县| 丽水市| 乌什县| 仪征市| 郎溪县| 柞水县| 灌云县| 永清县| 呼玛县| 淳化县| 上虞市| 拜泉县| 浠水县| 荆州市| 舒兰市| 彭山县| 武定县| 大理市| 江山市| 南安市| 绥宁县| 娱乐| 闽侯县| 手游| 延川县| 新化县| 齐齐哈尔市| 河东区| 革吉县| 庐江县| 积石山| 石台县| 林周县| 嘉兴市|