从Ansible事实收集输出生成主机概述

ansible-cmdb的Python项目详细描述


啊![状态:稳定](https://img.shields.io/badge/status-stable-green.svg) 啊![生成状态](http://build.electricmonk.nl/job/ansible-cmdb/shield) 啊![活动:积极发展](https://img.shields.io/badge/activity-active%20development-green.svg) 啊![许可证:gplv3](https://img.shields.io/badge/license-GPLv3-blue.svg

关于

Ansible CMDB获取Ansible事实收集的输出并将其转换为 包含系统配置的静态html概述页(以及其他内容) 信息。

它支持多种类型的输出(html、csv、sql等)和扩展 Ansible使用自定义数据收集的信息。对于每一个主机它也显示 组、宿主变量、自定义变量和机器本地事实。

啊![](https://raw.githubusercontent.com/fboender/ansible-cmdb/master/contrib/screenshot-overview.png

啊![](https://raw.githubusercontent.com/fboender/ansible-cmdb/master/contrib/screenshot-detail.png

[html示例](https://rawgit.com/fboender/ansible-cmdb/master/example/html_fancy.html)输出。

功能

(并非所有模板都支持所有功能)

  • 多种格式/模板:
    • 花哨的html(--template html_fancy),如上图所示。
    • 奇特的html拆分(--template html_fancy_split),包含每个主机的详细信息 在单独的文件中(对于大量主机)。
    • CSV(^ {CD3}}),值得信赖且灵活的逗号分隔格式。
    • json(--template json),以json格式转储所有事实。
    • 标记(--template markdown),用于复制粘贴到wiki和 如此。
    • 标记拆分(--template markdown_split),包含每个主机的详细信息 在一个单独的文件中(对于大量主机)。
    • sql(--template sql),用于将主机事实导入(my)sql数据库。
    • 纯文本表(--template txt_table),用于控制台专家。
    • 当然,任何你愿意定制的模板。
  • 主机概述和详细的主机信息。
  • 主机和组变量。
  • 收集宿主事实和手动自定义事实。
  • 添加和扩展现有主机的事实并手动添加全部 新东道主。
  • 自定义列

开始

完整文档的链接可以在下面找到,但这里有一个粗略的 说明Ansible CMDB如何工作,为您提供一个想法:

  1. 从[source,a release]安装Ansible CMDB 包](https://github.com/fboender/ansible-cmdb/releases)或通过pip:pip install ansible-cmdb
  1. 通过ansible获取主人的信息:

    $ mkdir out $ ansible -m setup –tree out/ all

  1. 使用Ansible CMDB生成CMDB HTML:

    $ ansible-cmdb out/ > overview.html

  1. 在浏览器中打开overview.html

就这样!请务必阅读有关使用的完整文档,因为有一些 如何使用生成的html的注意事项。

许可证

Ansible CMDB根据GPLv3获得许可:

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

For the full license, see the LICENSE file.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Requestcontextholder在spring 4中具有并发访问权限。IBMWebSphere上的x Web应用程序?   java如何下载、设置和使用Eclipse?   java如何组合这些mysql语句   java JDBC无法连接到openshift上的mysql数据库   如果存在允许正确处理的重载,java对于方便的方法来说是否可行?   使用hibernate序列的java Spring MVC不存在   具有路径的java Selenium ChromeDriver负载扩展问题   读一本书。java中的java文件   退出队列时,Java队列程序结果为空   Java lambda返回带有重复代码问题的列表   java使用意图从其他活动传递数据并在listview中显示   java如何在java中创建JSON输出   java Android:在不破坏或暂停活动的情况下关闭显示   支持Android电视和手机的java多apk   关于Java应用程序测试和调试的一组问题   如何在JavaSE中使用jdbcRealmShiro进行授权   在java中是否有一个无异常检查的URL解析实用程序?   当页面上有多个相同类型的元素时,java会选择一个特定的元素   递归需要帮助发现java代码中的缺陷