{"id":523,"date":"2015-10-21T21:52:56","date_gmt":"2015-10-21T13:52:56","guid":{"rendered":"http:\/\/www.ipcpu.com\/?p=523"},"modified":"2015-10-21T21:52:56","modified_gmt":"2015-10-21T13:52:56","slug":"ansible-cmdb","status":"publish","type":"post","link":"https:\/\/c.ipcpu.com\/2015\/10\/ansible-cmdb\/","title":{"rendered":"\u5f00\u6e90\u9879\u76ee\u4ecb\u7ecdansible-cmdb"},"content":{"rendered":"

\u6982\u8ff0<\/h2>\n

Ansible-cmdb\u662f\u4e00\u4e2a\u6839\u636eansible\u7684setup\u6a21\u5757\u5bf9\u670d\u52a1\u5668\u4fe1\u606f\u8fdb\u884c\u6536\u96c6\u5e76\u4e14\u6c47\u603b\u6210\u4e3aHTML\u9875\u9762\u7684\u8f6f\u4ef6\u3002<\/p>\n

\u5176\u751f\u6210\u7684html\u9875\u9762\u5305\u542b\u4e86\u4f17\u591a\u7684\u670d\u52a1\u5668\u5404\u9879\u4fe1\u606f\uff0c\u5e76\u4e14\u5e26\u6709\u641c\u7d22\u6846\uff0c\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u8fdb\u884c\u67e5\u627e\u3002<\/p>\n

\u5b98\u65b9\u7f51\u7ad9<\/h2>\n

https:\/\/github.com\/fboender\/ansible-cmdb<\/a><\/p>\n

\u8f6f\u4ef6\u5b89\u88c5<\/h2>\n

mac os x<\/p>\n

  1. brew install ansible<\/span>-<\/span>cmdb<\/span><\/code><\/li><\/ol><\/pre>\n

    CentOS\u7cfb\u7edf\u63d0\u4f9b\u4e86RPM\u5305\u3002\u53ef\u4ee5\u4e0b\u8f7d\u5b89\u88c5\u3002<\/p>\n

    \u4f7f\u7528\u65b9\u6cd5<\/h2>\n

    \u4f7f\u7528ansible\u7684setup\u6a21\u5757\u6536\u96c6\u6570\u636e\u751f\u6210\u6587\u672c\u6587\u4ef6<\/p>\n

    1. mkdir <\/span>out<\/span><\/code><\/li>
    2. ansible <\/span>-<\/span>m setup <\/span>--<\/span>tree <\/span>out<\/span>\/<\/span> all<\/span><\/code><\/li><\/ol><\/pre>\n

      \u6839\u636e\u6587\u672c\u6587\u4ef6\u751f\u6210html\u9875\u9762<\/p>\n

      1. ansible<\/span>-<\/span>cmdb <\/span>out<\/span>\/<\/span> <\/span>><\/span> overview<\/span>.<\/span>html<\/span><\/code><\/li><\/ol><\/pre>\n

        \u754c\u9762\u622a\u56fe<\/h2>\n

        \"\"<\/p>\n

        \u6f14\u793a\u9875\u9762<\/h2>\n

        https:\/\/rawgit.com\/fboender\/ansible-cmdb\/master\/example\/html_fancy.html<\/a><\/p>\n

        \u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def<\/a> » \u5f00\u6e90\u9879\u76ee\u4ecb\u7ecdansible-cmdb<\/a><\/p>","protected":false},"excerpt":{"rendered":"

        \u6982\u8ff0 Ansible-cmdb\u662f\u4e00\u4e2a\u6839\u636eansible\u7684setup\u6a21\u5757\u5bf9\u670d\u52a1\u5668\u4fe1\u606f\u8fdb\u884c\u6536\u96c6\u5e76\u4e14\u6c47\u603b\u6210\u4e3aHTML\u9875\u9762\u7684\u8f6f\u4ef6\u3002 \u5176\u751f\u6210\u7684html\u9875\u9762\u5305\u542b\u4e86\u4f17\u591a\u7684\u670d\u52a1\u5668\u5404\u9879\u4fe1\u606f\uff0c\u5e76\u4e14\u5e26\u6709\u641c\u7d22\u6846\uff0c\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u8fdb\u884c\u67e5\u627e\u3002 \u5b98\u65b9\u7f51\u7ad9 https:\/\/github.com\/fboender\/ansible-cmdb \u8f6f\u4ef6\u5b89\u88c5 mac os x brew install ansible-cmdb CentOS\u7cfb\u7edf\u63d0\u4f9b\u4e86RPM\u5305\u3002\u53ef\u4ee5\u4e0b\u8f7d\u5b89\u88c5\u3002 \u4f7f\u7528\u65b9\u6cd5 \u4f7f\u7528ansible\u7684setup\u6a21\u5757\u6536\u96c6\u6570\u636e\u751f\u6210\u6587\u672c\u6587\u4ef6 mkdir outansible -m setup –tree out\/ all \u6839\u636e\u6587\u672c\u6587\u4ef6\u751f\u6210html\u9875\u9762 ansible-cmdb out\/ > overview.html \u754c\u9762\u622a\u56fe \u6f14\u793a\u9875\u9762 https:\/\/rawgit.com\/fboender\/ansible-cmdb\/master\/example\/html_fancy.html \u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def » \u5f00\u6e90\u9879\u76ee\u4ecb\u7ecdansible-cmdb<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[45,17],"_links":{"self":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/523"}],"collection":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/comments?post=523"}],"version-history":[{"count":0,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/523\/revisions"}],"wp:attachment":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/media?parent=523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/categories?post=523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/tags?post=523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}