summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Houseknecht <chouseknecht@ansible.com>2016-07-12 13:09:33 -0400
committerGitHub <noreply@github.com>2016-07-12 13:09:33 -0400
commit73dbb744b561e7390737f550959c95302faa80fe (patch)
treefd9f4d6052ff3b352cf92c43c3a0ab4d685c0b00
parentf7558164b5e4b289efda6ea5673f3e113698b525 (diff)
parent7d33c6ccdf30a9b9877890efd4700efd5cda69bc (diff)
downloadansible-modules-core-73dbb744b561e7390737f550959c95302faa80fe.tar.gz
Merge pull request #3887 from Jorge-Rodriguez/docker-image-no-push-on-load
Don't forcibly push loaded images to registry.
-rw-r--r--cloud/docker/docker_image.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/cloud/docker/docker_image.py b/cloud/docker/docker_image.py
index 309d92a3..07c3aafb 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']:
@@ -267,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:
@@ -275,7 +275,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)