From 7c8d1a1d0adeaf478b72fc8aeff50b3a39f4d175 Mon Sep 17 00:00:00 2001 From: Olaf Kilian Date: Wed, 28 Oct 2015 10:14:54 +0100 Subject: [PATCH] Improve registry key parity between clients * Don't extract hostname part from docker_url since this leads to docker CLI client not recognizing Docker Hub credentials set by docker_login module anymore (looks for the full URL as a key). --- lib/ansible/modules/extras/cloud/docker/docker_login.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/ansible/modules/extras/cloud/docker/docker_login.py b/lib/ansible/modules/extras/cloud/docker/docker_login.py index 15216595fa..c00dc3f900 100644 --- a/lib/ansible/modules/extras/cloud/docker/docker_login.py +++ b/lib/ansible/modules/extras/cloud/docker/docker_login.py @@ -84,7 +84,7 @@ Login to a Docker registry without performing any other action. Make sure that t - name: login to private Docker remote registry and force reauthentification docker_login: - registry: https://your.private.registry.io/v1/ + registry: your.private.registry.io username: yourself password: secrets3 reauth: yes @@ -140,10 +140,6 @@ class DockerLoginManager: if self.reauth: self.log.append("Enforcing reauthentification") - # Extract hostname part from self.registry if url was specified. - registry_url = urlparse(self.registry) - self.registry = registry_url.netloc or registry_url.path - # Connect to registry and login if not already logged in or reauth is enforced. try: self.response = self.client.login(