From a0be466f90cdcc3a6c9daf503885eeeae41d50e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodr=C3=ADguez=2C=20Jorge?= Date: Wed, 8 Jun 2016 11:31:46 +0300 Subject: [PATCH 1/2] Don't forcibly push loaded images to registry. Fixes #3763 --- cloud/docker/docker_image.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloud/docker/docker_image.py b/cloud/docker/docker_image.py index 03bcd8a3e79..301e43e8613 100644 --- a/cloud/docker/docker_image.py +++ b/cloud/docker/docker_image.py @@ -191,11 +191,12 @@ EXAMPLES = ''' name: registry.ansible.com/chouseknecht/sinatra tag: v1 load_path: my_sinatra.tar + push: True ''' RETURN = ''' image: - description: Image inspection results for the affected image. + description: Image inspection results for the affected image. returned: success type: complex sample: {} @@ -236,7 +237,7 @@ class ImageManager(DockerBaseClass): self.state = parameters.get('state') self.tag = parameters.get('tag') self.http_timeout = parameters.get('http_timeout') - self.debug = parameters.get('debug') + self.debug = parameters.get('debug') self.push = False if self.state in ['present', 'build']: @@ -275,7 +276,6 @@ class ImageManager(DockerBaseClass): if not os.path.isfile(self.load_path): self.fail("Error loading image %s. Specified path %s does not exist." % (self.name, self.load_path)) - self.push = True image_name = self.name if self.tag: image_name = "%s:%s" % (self.name, self.tag) From 7d33c6ccdf30a9b9877890efd4700efd5cda69bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodr=C3=ADguez=2C=20Jorge?= Date: Wed, 8 Jun 2016 11:45:39 +0300 Subject: [PATCH 2/2] Do not forcibly push when building, either. --- cloud/docker/docker_image.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cloud/docker/docker_image.py b/cloud/docker/docker_image.py index 301e43e8613..8f5c22bee0e 100644 --- a/cloud/docker/docker_image.py +++ b/cloud/docker/docker_image.py @@ -268,7 +268,6 @@ class ImageManager(DockerBaseClass): self.log("Building image %s" % image_name) self.results['actions'].append("Built image %s from %s" % (image_name, self.path)) self.results['changed'] = True - self.push = True if not self.check_mode: self.results['image'] = self.build_image() elif self.load_path: