简体   繁体   English

如何使用ansible通过easy_install安装本地egg?

[英]How I can install a local egg with easy_install using ansible?

I have a couple of local egg packages (company specific stuff) that I need to install as part of ansible provision. 我有几个本地鸡蛋包(公司特定的物品),需要将它们安装在ansible物品中。

I can do a hacky install using shell commands, but I'm wondering if there's a more ansible-friendly/saner way to do it? 我可以使用shell命令进行恶意安装,但我想知道是否还有一种更友好/更友好的方法?

Not for eggs AFAIK. 不适用于鸡蛋AFAIK。 Ansible does have an easy_install module, but it doesn't haven an option to setup and egg locally. Ansible确实具有easy_install模块,但是它没有在本地设置和设置鸡蛋的选项。

You can try the pip module, but as you probably may have seen, local egg installs are not supported by pip . 您可以尝试使用pip模块,但是您可能已经看到, pip不支持本地egg安装。 So if you want to use the pip Ansible module you will have create a source distribution for those packages that you have as eggs. 因此,如果要使用pip Ansible模块,则将为作为鸡蛋的那些软件包创建源分发。

You can see the documentation for the Ansible pip module here: 您可以在此处查看Ansible pip模块的文档:

http://docs.ansible.com/pip_module.html http://docs.ansible.com/pip_module.html

Also, the pip documentation is here: 另外, pip文档在这里:

http://www.pip-installer.org/en/latest/ http://www.pip-installer.org/en/latest/

Of course, you can hack the easy_install module for Ansible but that may take you longer than just using the Ansible shell module. 当然,您可以为Ansible破解easy_install模块,但这可能会花费比仅使用Ansible shell模块更长的时间。

Hope it helps. 希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM