Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

NameError when running docker_login task against Docker Hub #5466

Closed
johnnynotsolucky opened this issue Nov 3, 2016 · 6 comments
Closed

Comments

@johnnynotsolucky
Copy link

ISSUE TYPE
  • Bug Report
COMPONENT NAME

docker_login

ANSIBLE VERSION
ansible 2.3.0 (devel 368a837481) last updated 2016/11/03 13:31:04 (GMT +200)
  lib/ansible/modules/core: (detached HEAD 7cc4d3fe04) last updated 2016/11/03 13:32:10 (GMT +200)
  lib/ansible/modules/extras: (detached HEAD e4bc618956) last updated 2016/11/03 13:32:36 (GMT +200)
  config file =
  configured module search path = Default w/o overrides
CONFIGURATION
OS / ENVIRONMENT
  • OS X 10.11.6
  • Linux 4.4.23-31.51.amzn1.x86_64 x86_64
SUMMARY

docker_login module throws a NameError when validating the task parameters for Docker Hub authentication.

STEPS TO REPRODUCE

Run a docker_login task

tasks:
  - docker_login:
      username: <username>
      password: <password>
      email: <email>
EXPECTED RESULTS

To be logged into Docker Hub

ACTUAL RESULTS
The error was: NameError: global name 'module' is not defined
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n  File \"/var/folders/74/y_0xp6zs31b8fxxl3csvqw100000gp/T/ansible_NfSlXR/ansible_module_docker_login.py\", line 329, in <module>\n    main()\n  File \"/var/folders/74/y_0xp6zs31b8fxxl3csvqw100000gp/T/ansible_NfSlXR/ansible_module_docker_login.py\", line 317, in main\n    if module.params['state'] == 'present' and module.params['registry_url'] == DEFAULT_DOCKER_REGISTRY and not module.params['email']:\nNameError: global name 'module' is not defined\n", "module_stdout": "", "msg": "MODULE FAILURE"}
johnnynotsolucky pushed a commit to johnnynotsolucky/ansible-modules-core that referenced this issue Nov 3, 2016
@ansibot
Copy link

ansibot commented Nov 3, 2016

@olsaki ping, this issue is waiting for your response.
click here for bot help

@phoenix741
Copy link

Hi,

I have the same bug, and the bugfix resolve the problem

@ansibot
Copy link

ansibot commented Nov 19, 2016

@olsaki, ping. This issue is still waiting on your response.
click here for bot help

@ansibot
Copy link

ansibot commented Dec 7, 2016

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo.

@westsouthnight
Copy link

@bcoca ping

@johnnynotsolucky
Copy link
Author

This issue was moved to ansible/ansible#19743

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants