shift31 / hostbase-ansible-inventory
此软件包已被弃用且不再维护。未建议替代软件包。
Ansible 的 Hostbase 驱动动态库存
0.2.1
2015-02-02 06:06 UTC
Requires
- php: >=5.4
- illuminate/console: ~4
- illuminate/support: ~4
- shift31/hostbase-api-client: 0.2.*
This package is not auto-updated.
Last update: 2020-01-24 16:43:31 UTC
README
为 Ansible 提供的动态库存脚本。
要求
- Hostbase 服务器
- PHP >= 5.4
安装
-
下载 PHAR 文件:https://github.com/shift31/hostbase-ansible-inventory/raw/master/hostbase-ansible.phar
-
将其移动到您选择的 Ansible 库脚本位置
-
使其可执行
chmod +x hostbase-ansible.phar
配置
在您的当前目录、主目录或 /etc 中创建 hostbase-cli.config.php
'groups' 应该是一个数组,包含用于将主机分组在一起的主机对象键名。
<?php return [ 'baseUrl' => 'http://your.hostbase.server', 'groups' => ['dataCenter', 'environment'] ];
用法
hostbase-ansible [-o|--host="..."] [-l|--list] [-i|--limit="..."] [-g|--list-groups]
帮助
hostbase-ansible.phar -h
选项
--host (-o) Show a host
--list (-l) List hosts by group
--limit (-i) Maximum number of hosts (default: 10000)
--list-groups (-g) List groups