mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Don't forcibly push loaded images to registry. Fixes #3763
This commit is contained in:
parent
622592c413
commit
89e8787d65
1 changed files with 3 additions and 3 deletions
|
@ -191,11 +191,12 @@ EXAMPLES = '''
|
||||||
name: registry.ansible.com/chouseknecht/sinatra
|
name: registry.ansible.com/chouseknecht/sinatra
|
||||||
tag: v1
|
tag: v1
|
||||||
load_path: my_sinatra.tar
|
load_path: my_sinatra.tar
|
||||||
|
push: True
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
image:
|
image:
|
||||||
description: Image inspection results for the affected image.
|
description: Image inspection results for the affected image.
|
||||||
returned: success
|
returned: success
|
||||||
type: complex
|
type: complex
|
||||||
sample: {}
|
sample: {}
|
||||||
|
@ -236,7 +237,7 @@ class ImageManager(DockerBaseClass):
|
||||||
self.state = parameters.get('state')
|
self.state = parameters.get('state')
|
||||||
self.tag = parameters.get('tag')
|
self.tag = parameters.get('tag')
|
||||||
self.http_timeout = parameters.get('http_timeout')
|
self.http_timeout = parameters.get('http_timeout')
|
||||||
self.debug = parameters.get('debug')
|
self.debug = parameters.get('debug')
|
||||||
self.push = False
|
self.push = False
|
||||||
|
|
||||||
if self.state in ['present', 'build']:
|
if self.state in ['present', 'build']:
|
||||||
|
@ -275,7 +276,6 @@ class ImageManager(DockerBaseClass):
|
||||||
if not os.path.isfile(self.load_path):
|
if not os.path.isfile(self.load_path):
|
||||||
self.fail("Error loading image %s. Specified path %s does not exist." % (self.name,
|
self.fail("Error loading image %s. Specified path %s does not exist." % (self.name,
|
||||||
self.load_path))
|
self.load_path))
|
||||||
self.push = True
|
|
||||||
image_name = self.name
|
image_name = self.name
|
||||||
if self.tag:
|
if self.tag:
|
||||||
image_name = "%s:%s" % (self.name, self.tag)
|
image_name = "%s:%s" % (self.name, self.tag)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue