From a64bae30b5a75a7a9f34d60624da4d1938be2390 Mon Sep 17 00:00:00 2001 From: Olaf Kilian Date: Thu, 7 May 2015 09:36:32 +0200 Subject: [PATCH] Added more meaningful fail messages on Docker API --- lib/ansible/modules/extras/cloud/docker/docker_login.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/extras/cloud/docker/docker_login.py b/lib/ansible/modules/extras/cloud/docker/docker_login.py index b515b414c5..1292fe3890 100644 --- a/lib/ansible/modules/extras/cloud/docker/docker_login.py +++ b/lib/ansible/modules/extras/cloud/docker/docker_login.py @@ -153,6 +153,8 @@ class DockerLoginManager: reauth=self.reauth, dockercfg_path=self.dockercfg_path ) + except DockerAPIError as e: + self.module.fail_json(msg="Docker API Error: %s" % e.explanation) except Exception as e: self.module.fail_json(msg="failed to login to the remote registry", error=repr(e))