GitHub Address: Https://github.com/fboender/ansible-cmdb
Gathering information from facts, generating a host overview
Installation
wget https://github.com/fboender/ansible-cmdb/releases/download/1.17/ansible-cmdb-1.17.tar.gztar zxf ansible-cmdb-1.17.tar.gz cd ansible-cmdb-1.17make install
Use
Generate facts information for all hosts
out/ all
Build a Web page
out/ > overview.html
Paste_image.png
The default template is html_fancy and the file is stored in/USR/LOCAL/LIB/ANSIBLE-CMDB/ANSIBLECMDB/DATA/TPL/HTML_FANCY.TPL
If facts uses a local cache,-f specifies the cache directory.
/path/to/facts/dir > overview.html
The ansible host information is counted in the form of the assets list.
Ansible-cmdb-t txt_table--columns Name,os,ip,mem,cpus out/
Paste_image.png
Output host information in CSV format
ansible-cmdb -t csv -i hosts out/
Paste_image.png
Output SQL file, import data to MySQL or SQLite
ansible-cmdb -t sql -i hosts out/
转自
"CMDB" of the Ansible plugin-Pinterest
http://www.jianshu.com/p/19b8d185c770
Ansible "CMDB" "Turn" of the plugin