Merge pull request #37863 from rallytime/bp-36893

Back-port #36893 to 2016.3
This commit is contained in:
Nicole Thomas 2016-11-23 10:09:09 -07:00 committed by GitHub
commit d0cc7f0d56

View File

@ -55,6 +55,7 @@ be used, it is recommended to place this configuration in :ref:`Pillar
email: <email_address>
password: <password>
username: <username>
reauth: <boolean>
For example:
@ -66,6 +67,22 @@ For example:
password: s3cr3t
username: foo
Reauth is an optional parameter that forces the docker login to reauthorize using
the credentials passed in the pillar data. Defaults to false.
.. versionadded:: 2016.3.5,2016.11.1
For example:
.. code-block:: yaml
docker-registries:
https://index.docker.io/v1/:
email: foo@foo.com
password: s3cr3t
username: foo
reauth: True
Mulitiple registries can be configured. This can be done in one of two ways.
The first way is to configure each registry under the ``docker-registries``
pillar key.
@ -953,7 +970,8 @@ def _image_wrapper(attr, *args, **kwargs):
creds['username'],
password=creds['password'],
email=creds.get('email'),
registry=registry)
registry=registry,
reauth=creds.get('reauth', False))
except KeyError:
raise SaltInvocationError(
err.format('Incomplete', ' for registry {0}'.format(registry))