-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
能简单讲讲ansible-api原理吗? #10
Comments
Ansible API主要是通Ansible的plugins插件方式,把请求传递给Ansible去执行,对吧? |
不完全是这样,ansible-api实现了ansible和ansbile-playbook的基本功能(重新用多线程模式把ansible的cli写了一次),然后通过借助他的task和callback机制来获取结构化返回数据。最后把这些操作封装成了http api |
我通过官方的api,用两个线程同时跑两个playbook,第一次能正常运行(playbook按照设置的步骤失败),再次跑的时候就出现了 ' NoneType' object has no attribute 'name'的问题。总之要隔一段时间才能正常多线程跑,请问您遇到过这种问题吗? |
@leoomo 是起了2个进程么 如果起了一个进程是没有问题的 ansible-api会使用线程池自己来控制多线程运行的 几百台server累计运行1年多 没有发现这个错误。从报错内容看,猜测是playbook的name属性没有了,如果传参没有问题,那很有可能就是你开了多个进程(不是线程)导致的 |
能简单讲讲ansible-api原理吗?
The text was updated successfully, but these errors were encountered: