ansibleapi逻辑导图
2016-12-31 23:57:36 0 举报
AI智能生成
逻辑
作者其他创作
大纲/内容
adict={'all':{'hosts':{'moban':{"ansible_ssh_host":ip}}}}
raw=conv(adict)
ret=job(json.dumps(raw),play,port,password)
赋值给一个字典
调用conv函数处理
传入到job函数处理
调用get_inventory处理
inventory = YunweiInventory(adict)
调用YunweiInventory处理
self.parser = YwScript(adict)
调用YwScript类来处理字典
{"all": {"hosts": ["moban"]}, "_meta": {"hostvars": {"moban": {"ansible_ssh_host": "172.16.85.3"}}}}
{"all": {"hosts": ["moban"]}, "_meta": {"hostvars": {"moban": {"ansible_ssh_host": "172.16.85.3"}}}}
data="_meta": {"hostvars": {"moban": {"ansible_ssh_host": "172.16.85.3"}}}}
all data {u'hosts': [u'moban']}
-------
_meta data {u'hostvars': {u'moban': {u'ansible_ssh_host': u'172.16.85.3'}}}
-------
_meta data {u'hostvars': {u'moban': {u'ansible_ssh_host': u'172.16.85.3'}}}
自由主题
收藏
收藏
0 条评论
下一页