Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor issues with docker_login docs #35081

Merged
merged 3 commits into from
Aug 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 2 additions & 9 deletions lib/ansible/modules/cloud/docker/docker_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@
email:
required: False
description:
- "The email address for the registry account. NOTE: private registries may not require this,
but Docker Hub requires it."
- "The email address for the registry account."
reauthorize:
description:
- Refresh exiting authentication found in the configuration file.
- Refresh existing authentication found in the configuration file.
type: bool
default: 'no'
aliases:
Expand Down Expand Up @@ -90,7 +89,6 @@
docker_login:
username: docker
password: rekcod
email: docker@docker.io

- name: Log into private registry and force re-authorization
docker_login:
Expand All @@ -103,13 +101,11 @@
docker_login:
username: docker
password: rekcod
email: docker@docker.io
config_path: /tmp/.mydockercfg

- name: Log out of DockerHub
docker_login:
state: absent
email: docker@docker.com
'''

RETURN = '''
Expand Down Expand Up @@ -316,9 +312,6 @@ def main():
login_result={}
)

if client.module.params['state'] == 'present' and client.module.params['registry_url'] == DEFAULT_DOCKER_REGISTRY and not client.module.params['email']:
lachlancooper marked this conversation as resolved.
Show resolved Hide resolved
client.module.fail_json(msg="'email' is required when logging into DockerHub")

LoginManager(client, results)
if 'actions' in results:
del results['actions']
Expand Down