Error saying "KeyError: 'ApiVersion'" - Ansible

0 votes

I'm getting the following error:

failed: [] => {"failed": true, "item": "", "parsed": false}
invalid output was: Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1400951250.7-173380463612813/docker", line 1959, in <module>
  File "/root/.ansible/tmp/ansible-tmp-1400951250.7-173380463612813/docker", line 693, in main
    containers = manager.create_containers(1)
  File "/root/.ansible/tmp/ansible-tmp-1400951250.7-173380463612813/docker", line 548, in create_containers
    if docker.utils.compare_version('1.10', self.client.version()['ApiVersion']) < 0:
KeyError: 'ApiVersion'

I'm using Ansible version 1,7 and docker version 0.9.1

Jan 8 in Ansible by Ali
• 10,380 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

The reason behind this error is that the older version of docker does not have the ApiVersion specified. 

The only thing you can do is update your docker version. Follow these commands:

$ sudo apt-get install -y python-pip
$ sudo pip install docker-py
answered Jan 8 by Sasha

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Remote host throwing error saying "Permission Denied" - Ansible

Hey @Patrick, Change the path of Ansible's remote_tmp ...READ MORE

answered Jan 16 in Ansible by Cerci
0 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,140 points
+1 vote
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.