无法安装ansible-awx

Unable to install ansible-awx

我正在尝试安装 AWX,但它因以下错误而失败

版本信息

ansible --version
ansible 2.4.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.6.6 (r266:84292, Aug 18 2016, 08:36:59) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]

docker --version

Docker version 1.6.1, build a8a31ef/1.6.1

pip install docker-py --trusted-host pypi.python.org
Requirement already satisfied: docker-py in /usr/lib/python3.6/site-packages
Requirement already satisfied: websocket-client>=0.32.0 in /usr/lib/python3.6/site-packages (from docker-py)
Requirement already satisfied: requests!=2.11.0,>=2.5.2 in /usr/lib/python3.6/site-packages (from docker-py)
Requirement already satisfied: six>=1.4.0 in /usr/lib/python3.6/site-packages (from docker-py)
Requirement already satisfied: docker-pycreds>=0.2.1 in /usr/lib/python3.6/site-packages (from docker-py)
Requirement already satisfied: idna<2.7,>=2.5 in /usr/lib/python3.6/site-packages (from requests!=2.11.0,>=2.5.2->docker-py)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3.6/site-packages (from requests!=2.11.0,>=2.5.2->docker-py)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.6/site-packages (from requests!=2.11.0,>=2.5.2->docker-py)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/lib/python3.6/site-packages (from requests!=2.11.0,>=2.5.2->docker-py)

错误

 ansible-playbook -i inventory install.yml

PLAY [Build and deploy AWX] **************************************************************************************************************************************************************************************************

TASK [check_vars : include_tasks] ********************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [check_vars : include_tasks] ********************************************************************************************************************************************************************************************
included: /root/awx-devel/installer/check_vars/tasks/check_docker.yml for localhost

TASK [check_vars : postgres_data_dir should be defined] **********************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "failed": false,
    "msg": "All assertions passed"
}

TASK [check_vars : host_port should be defined] ******************************************************************************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "failed": false,
    "msg": "All assertions passed"
}

TASK [image_build : Get Version from checkout if not provided] ***************************************************************************************************************************************************************
changed: [localhost -> localhost]

TASK [image_build : Set global version if not provided] **********************************************************************************************************************************************************************
ok: [localhost]

TASK [image_build : Verify awx-logos directory exists for official install] **************************************************************************************************************************************************
skipping: [localhost]

TASK [image_build : Copy logos for inclusion in sdist] ***********************************************************************************************************************************************************************
skipping: [localhost]

TASK [image_build : Set sdist file name] *************************************************************************************************************************************************************************************
ok: [localhost]

TASK [image_build : AWX Distribution] ****************************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "awx-.tar.gz"
}

TASK [image_build : Stat distribution file] **********************************************************************************************************************************************************************************
ok: [localhost -> localhost]

TASK [image_build : Clean distribution] **************************************************************************************************************************************************************************************
changed: [localhost -> localhost]

TASK [image_build : Build sdist builder image] *******************************************************************************************************************************************************************************
fatal: [localhost -> localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to import docker-py - No module named requests.exceptions. Try `pip install docker-py`"}
        to retry, use: --limit @/root/awx-devel/installer/install.retry

PLAY RECAP *******************************************************************************************************************************************************************************************************************
localhost                  : ok=9    changed=2    unreachable=0    failed=1

谁能指出我做错了什么?

还有没有一种方法可以在虚拟机中安装 AWX 而无需 docker/container,就像任何其他应用程序一样?

Ansible 告诉你:

python version = 2.6.6

Pip 告诉你:

Requirement already satisfied: docker-py in /usr/lib/python3.6/site-packages

比较上面的 Python 版本号并修复。