Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Ansible AWX installation error Cannot have both the docker-py and docker python modules

While installing Ansible AWX on Ubuntu I was receiving below error, while installing Ansible AWX it was giving below error.

TASK [local_docker : Remove AWX containers before migrating postgres so that the old postgres container does not get used] ***********************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Cannot have both the docker-py and docker python modules (old and new version of Docker SDK for Python) installed together as they use the same namespace and cause a corrupt installation. Please uninstall both packages, and re-install only the docker-py or docker python module (for ansible-awx's Python /usr/bin/python3). It is recommended to install the docker module if no support for Python 2.6 is required. Please note that simply uninstalling one of the modules can leave the other module in a broken state."}
...ignoring

installation error ansible awx remove awx containers before migrating postgres so that the old postgres container does not get used ubuntu centos.png

This issue causes due to compatibility issue (mismatched version between docker and docker-compose). To resolve uninstall all components of docker.

sudo pip3 uninstall docker docker-py docker-compose

Freshly install all the component, I am installing docker-compose using pything pip3. For the complete and proper steps to install Ansible Awx you can follow my article Install Ansible AWX Tower on Ubuntu Linux.

sudo pip3 install docker-compose
sudo apt install docker docker.io -y

ansible awx sudo pip3 uninstall docker docker-py docker-compose sudo pip3 install docker-compose docker container automation.png

Useful Articles
Ansible AWX installation error docker-compose run --rm --service-ports task awx-manage migrate --no-input
How to install Docker on Linux
 How to install Ansible on Linux for vSphere configuration
Getting started Ansible AWX tower for IT automation run first playbook
Ansible for VMwary Using vmware_vm_inventory dynamic inventory plugin
Ansible selectattr The error was TemplateRuntimeError no test named 'equalto'
ansible create an array with set_fact
Ansible get information from esxi advanced settings nested dictionary with unique keynames

Go Back

Comment

Blog Search

Page Views

11240260

Follow me on Blogarama