我正在尝试使用提供的Ansible剧本AWX将AWX从本地安装到远程服务器。由于远程服务器没有互联网连接,我删除了dockerhub变量以在运行时创建映像。 Docker已安装并正在运行,docker-py也已安装。我可以导入docker;从python打印(docker.version),所以docker-py显然可以正常工作。
现在,当我运行install.yml剧本时,它在此步骤失败:[image_build:构建sdist构建器映像]
错误是:
The full traceback is:
File "/tmp/ansible_KNeNaW/ansible_modlib.zip/ansible/module_utils/docker_common.py", line 203, in __init__
super(AnsibleDockerClient, self).__init__(**self._connect_params)
File "/usr/lib/python2.7/site-packages/docker/client.py", line 99, in __init__
self._version = self._retrieve_server_version()
File "/usr/lib/python2.7/site-packages/docker/client.py", line 124, in _retrieve_server_version
'Error while fetching server API version: {0}'.format(e)
fatal: [hostname_removed -> localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"api_version": "auto",
"archive_path": null,
"buildargs": {
"http_proxy": "",
"https_proxy": "",
"no_proxy": ""
},
"cacert_path": null,
"cert_path": null,
"container_limits": null,
"debug": false,
"docker_host": "unix://var/run/docker.sock",
"dockerfile": "Dockerfile.sdist",
"force": true,
"http_timeout": null,
"key_path": null,
"load_path": null,
"name": "awx_sdist_builder",
"nocache": false,
"path": "GIT/awx/installer/roles/image_build/files",
"pull": true,
"push": false,
"repository": null,
"rm": true,
"ssl_version": null,
"state": "present",
"tag": "2.0.0",
"timeout": 60,
"tls": false,
"tls_hostname": "localhost",
"tls_verify": false,
"use_tls": "no"
}
},
"msg": "Error connecting: Error while fetching server API version: ('Connection aborted.', error(2, 'No such file or directory'))"
}
有人知道哪里出了问题吗?