From 1e7ab24e400ddc4f3ceb030f08168d50a4369ec3 Mon Sep 17 00:00:00 2001 From: Lachlan Cooper Date: Thu, 30 Aug 2018 14:33:39 +1000 Subject: [PATCH] Fix minor issues with docker_login docs (#35081) * Fix typos in docker_login reauthorize parameter * Remove note about docker_login email address Docker Hub no longer requires an email address. * Remove check for email parameter with Docker Hub This is no longer required, so login should not fail if it's not provided. --- lib/ansible/modules/cloud/docker/docker_login.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/ansible/modules/cloud/docker/docker_login.py b/lib/ansible/modules/cloud/docker/docker_login.py index 4718de8005..8fe95ffa4e 100644 --- a/lib/ansible/modules/cloud/docker/docker_login.py +++ b/lib/ansible/modules/cloud/docker/docker_login.py @@ -46,11 +46,10 @@ options: 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: @@ -98,7 +97,6 @@ EXAMPLES = ''' docker_login: username: docker password: rekcod - email: docker@docker.io - name: Log into private registry and force re-authorization docker_login: @@ -111,13 +109,11 @@ EXAMPLES = ''' 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 = ''' @@ -324,9 +320,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']: - client.module.fail_json(msg="'email' is required when logging into DockerHub") - LoginManager(client, results) if 'actions' in results: del results['actions']