add option to force a reauth for a docker registry

Fixes #32829. Adds ability to specify reauth in the docker-registry pillar data structure to specify the reauth kwarg to docker-py login call. If not specified it defaults to old behaviour of False
This commit is contained in:
Tyler Hunt 2016-10-10 12:02:00 -06:00 committed by rallytime
parent b17a118e72
commit 5b0c11ab47

View file

@ -953,7 +953,8 @@ def _image_wrapper(attr, *args, **kwargs):
creds['username'],
password=creds['password'],
email=creds.get('email'),
registry=registry)
registry=registry,
reauth=cred.get('reauth', False))
except KeyError:
raise SaltInvocationError(
err.format('Incomplete', ' for registry {0}'.format(registry))