我想将 ansible 更改为在控制器上使用 python3.5。我已经安装了ansible和python3.5,有没有办法将其更改为使用python3?
ansible 文档建议使用 ansible 和python3 /usr/bin/ansible localhost -m ping. 但是,如果这不起作用,请不要提供更多细节。
我的结果是:
Traceback (most recent call last):
File "/usr/bin/ansible", line 32, in <module>
from ansible import context
ImportError: No module named 'ansible'
Run Code Online (Sandbox Code Playgroud)
我也尝试过 pip3 install ansible 没有运气:
File "<string>", line 1, in <module>
File "/tmp/pip-build-eadti4n6/ansible/setup.py", line 12
print "Ansible now needs setuptools in order to build. " \
^
SyntaxError: Missing parentheses in call to 'print'
Run Code Online (Sandbox Code Playgroud)