Ansible从源代码安装 - 我的库设置应该是什么?

时间:2015-09-02 10:21:42

标签: ansible

我已根据以下说明从源代码安装了Ansible:

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

但是当我尝试使用除script以外的任何命令时,我收到以下错误:

fatal: [...]: FAILED! => {"failed": true, "msg": "ERROR! The module get_url was not found in configured module paths"}

如果源Ansible目录是/home/cloud/ansible,并且我已经完成make install,我应该在ansible.cfg中将library路径设置设置为什么?

1 个答案:

答案 0 :(得分:1)

正如@udondan所说,请确保使用:

git clone https://github.com/ansible/ansible --recursive

克隆Ansible仓库,然后运行:

cd ./ansible
source ./hacking/env-setup

您不需要运行make install

运行Ansible的机器也需要其他一些Python模块,它们列在http://docs.ansible.com/ansible/intro_installation.html#running-from-source部分的底部。最好安装pip Python包管理器:

sudo easy_install pip

然后安装所需的包:

sudo pip install paramiko PyYAML Jinja2 httplib2 six
相关问题