added documentation for the new reuth option in docker registry configuration

also fixed a typo in the new code where I used cred instead of creds
This commit is contained in:
Tyler Hunt 2016-10-11 14:20:33 -06:00 committed by rallytime
parent 5b0c11ab47
commit 5ca2c388c2

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,18 @@ 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. 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.
@ -954,7 +967,7 @@ def _image_wrapper(attr, *args, **kwargs):
password=creds['password'],
email=creds.get('email'),
registry=registry,
reauth=cred.get('reauth', False))
reauth=creds.get('reauth', False))
except KeyError:
raise SaltInvocationError(
err.format('Incomplete', ' for registry {0}'.format(registry))