In my quest to upgrade AWX to a more somewhat recent version I am getting hit with the following error:
TASK [local_docker : Stop AWX before upgrading postgres] ********************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “Failed to import the required Python library (Docker SDK for Python: docker (Python >= 2.7) or docker-py (Python 2.6)) on d1xawxmgt01.paneracloud.com’s Python /usr/bin/python3. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter, for example via pip install docker
or pip install docker-py
(Python 2.6). The error was: No module named ‘requests’”}
I am running this on RHEL 7.9 with Python 3.4 and 3.6 installed. I have tried specifying the interpreter but I get the same error. I am using docker-ce for this.
$ rpm -qa|grep -i docker
docker-scan-plugin-0.8.0-3.el7.x86_64
docker-ce-rootless-extras-20.10.7-3.el7.x86_64
python-docker-pycreds-0.3.0-11.el7.noarch
python-docker-py-1.10.6-11.el7.noarch
docker-ce-cli-20.10.7-3.el7.x86_64
docker-ce-20.10.7-3.el7.x86_64
Any help is very much appreciated. I remember I had these issues when I tried to deploy it.