Commit d6c4017a authored by kikiyou's avatar kikiyou Committed by ibuler

使示例可以正确运行 (#237)

为了安全pattern=空,后示例代码无法使用,运行示例时加上pattern='*',使示例可以返回正确的结果
parent b7be5d14
...@@ -493,8 +493,8 @@ if __name__ == "__main__": ...@@ -493,8 +493,8 @@ if __name__ == "__main__":
# # "ansible_become_user": "root", # # "ansible_become_user": "root",
# "ansible_become_pass": "yusky0902", # "ansible_become_pass": "yusky0902",
}] }]
cmd = Command(resource) cmd.run('ls',pattern='*')
print cmd.run('ls') print cmd.results_raw
# resource = [{"hostname": "192.168.10.148", "port": "22", "username": "root", "password": "xxx"}] # resource = [{"hostname": "192.168.10.148", "port": "22", "username": "root", "password": "xxx"}]
# task = Tasks(resource) # task = Tasks(resource)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment