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处理<br>
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']}<br>-------<br>_meta data {u'hostvars': {u'moban': {u'ansible_ssh_host': u'172.16.85.3'}}}
自由主题
<br>