好吧,这似乎是一个已知的错误:
https://github.com/ansible/ansible/issues/31419
在Ansible
2.4.0中,模块副本使用测试套件中的符号链接:https
:
//github.com/ansible/ansible/tree/devel/test/integration/targets/copy/files/subdir/subdir1
circles -> ../subdir3 -> ../subdir2/subdir3
Windows 10无法创建此目录树,因为路径太长。实际上,解决的路径是:
test/integration/targets/copy/files/subdir/subdir1/circles/subdir1/circles/subdir1/circles/subdir1/circles/subdir1/circles/subdir1/circles/subdir1/circles/subdir1/circles/subdir2/subdir3/
错误报告的结尾:
解决方法我们不支持直接在Windows计算机上安装ansible。您将需要类似linux的 *** 作系统才能在
一个可能的解决方法是在pypi上下载转轮,它不依赖于Linux或其他任何东西,可能是纯python:
https://pypi.python.org/pypi/ansible/2.5.0a
(该
pip install ansible命令下载了“源”
.tgz归档文件,执行了测试,…并且路径问题在测试之内,所以让我们使用一个现成的预构建包)
下载后,使用
pip install path/to/the/wheel/file.whl
已在我的Windows 10计算机上测试并成功安装:
C:Usersjotd>c:Python27scriptspip install C:UsersjotdDownloadsansible-2.5.0a1-py2-none-any.whlProcessing c:usersjotddownloadsansible-2.5.0a1-py2-none-any.whlRequirement already satisfied: PyYAML in c:python27libsite-packages (from ansible==2.5.0a1)Collecting cryptography (from ansible==2.5.0a1)<a lot of package collecting...>Installing collected packages: idna, pycparser, cffi, asn1crypto, ipaddress, cryptography, pynacl, bcrypt, pyasn1, paramiko, ansible Running setup.py install for pycparser ... done Running setup.py install for ipaddress ... doneSuccessfully installed ansible-2.5.0a1 asn1crypto-0.24.0 bcrypt-3.1.4 cffi-1.11.4 cryptography-2.1.4 idna-2.6 ipaddress-1.0.19 paramiko-2.4.0 pyasn1-0.4.2 pycparser-2.18 pynacl-1.2.1
好的,已安装,但是让我们尝试导入它:
C:Usersjotd>c:python27pythonPython 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.>>> import ansible>>>
作品!好极了!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)