Ops icon indicating copy to clipboard operation
Ops copied to clipboard

资产采集的客户端

Open strugglehonor opened this issue 4 years ago • 5 comments

大佬,请问可以传一下资产采集的客户端代码吗,想看看您采集资产是怎么编写playbook,操作ansible API,以及过滤数据

strugglehonor avatar May 15 '20 03:05 strugglehonor

你指的是采集服务器的基本信息,还是采集阿里云资产?而且所有的代码都在仓库里了,没有其他额外的代码

pythonzm avatar May 16 '20 13:05 pythonzm

大佬,我指的是采集服务器的基本信息

strugglehonor avatar May 16 '20 13:05 strugglehonor

请问是没有用ansible playbook,直接调用ansible API采集到数据然后进行过滤,然后发给后端进行处理与入库吗

strugglehonor avatar May 16 '20 13:05 strugglehonor

嗯,没有用playbook,直接使用的 setup 模块,这个函数就是解析的过程:https://github.com/pythonzm/Ops/blob/master/assets/views.py#L448

pythonzm avatar May 18 '20 01:05 pythonzm

get,非常感谢哈

strugglehonor avatar May 18 '20 01:05 strugglehonor