AWX Installation Failing!

Hi,

I installed docker, docker-py, ansible and cloned AWX. When i try to install AWX, I am getting below error. Any help will be appreciated. Thank you.

TASK [local_docker : Activate postgres container] *******************************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: create_host_config() got an unexpected keyword argument ‘init’
fatal: [localhost]: FAILED! => {“changed”: false, “module_stderr”: “Traceback (most recent call last):\n File "/tmp/ansible_HfVjrh/ansible_module_docker_container.py", line 2081, in \n main()\n File "/tmp/ansible_HfVjrh/ansible_module_docker_container.py", line 2076, in main\n cm = ContainerManager(client)\n File "/tmp/ansible_HfVjrh/ansible_module_docker_container.py", line 1703, in init\n self.present(state)\n File "/tmp/ansible_HfVjrh/ansible_module_docker_container.py", line 1723, in present\n new_container = self.container_create(self.parameters.image, self.parameters.create_parameters)\n File "/tmp/ansible_HfVjrh/ansible_module_docker_container.py", line 825, in create_parameters\n host_config=self._host_config(),\n File "/tmp/ansible_HfVjrh/ansible_module_docker_container.py", line 931, in _host_config\n return self.client.create_host_config(**params)\n File "/usr/local/lib/python2.7/dist-packages/docker/api/container.py", line 157, in create_host_config\n return utils.create_host_config(*args, **kwargs)\nTypeError: create_host_config() got an unexpected keyword argument ‘init’\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE”, “rc”: 1}
to retry, use: --limit @/root/awx/installer/install.retry

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

Warm Regards,
Ram V

Hey Ram,

I had just recently encountered the issue as well, and the problem is most likely having the docker-py python library installed instead of the docker python library. (https://github.com/docker/docker-py). This seems to have recently changed since last month as now being an issue.

https://github.com/ansible/awx/issues/2041

Fix is to uninstall docker-py, and install docker instead.

  • pip uninstall docker-py
  • pip install docker

Hi Garrett,

Thank you so much for your help and support. I will try your suggestions and keep you posted soon.

Thanks,
Ram

After trying this many times and failing I found the solution for me was to change the python interpreter in /awx/installer/inventory to this:

#localhost ansible_connection=local ansible_python_interpreter=“/usr/bin/env python”
localhost ansible_connection=local ansible_python_interpreter=“/usr/bin/env python3”