Ansible从github安装,根据安全网站的指示,似乎工作正常。 但是星系失败了:
# ansible-galaxy -vvv install goozbach.epel Using /etc/ansible/ansible.cfg as config file Opened /home/alf/.ansible_galaxy Validate TLS certificates: True Connecting to galaxy_server: https://galaxy.ansible.com Base API: https://galaxy.ansible.com/api/v1 ERROR! Unexpected Exception: 'Galaxy' object has no attribute 'roles_paths' the full traceback was: Traceback (most recent call last): File "/opt/ansible/bin/ansible-galaxy", line 86, in <module> sys.exit(cli.run()) File "/opt/ansible/lib/ansible/cli/galaxy.py", line 153, in run self.execute() File "/opt/ansible/lib/ansible/cli/__init__.py", line 114, in execute fn() File "/opt/ansible/lib/ansible/cli/galaxy.py", line 394, in execute_install roles_left.append(GalaxyRole(self.galaxy, **role)) File "/opt/ansible/lib/ansible/galaxy/role.py", line 70, in __init__ for path in galaxy.roles_paths: AttributeError: 'Galaxy' object has no attribute 'roles_paths'
同样的设置在CentOS6机器上工作正常(FC22是我的笔记本电脑)。 我怀疑一些安装陷阱(缺lesspython库或其他),但到目前为止还没有发现任何东西。
编辑 :我可以通过在/opt/ansible/lib/ansible/galaxy/role.py,行70和77,galaxy.roles_paths与galaxy.options.roles_path – 检查pdb中的星系物体,属性roles_paths确实不存在。 然而,理解为什么它应该如此,是另外一回事。