{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3549","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3549/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3549/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3549/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/3549","id":151116847,"number":3549,"title":"ec2_eip error: 'module' not found","user":{"login":"Dmitry1987","id":9369080,"avatar_url":"https://avatars.githubusercontent.com/u/9369080?v=3","gravatar_id":"","url":"https://api.github.com/users/Dmitry1987","html_url":"https://github.com/Dmitry1987","followers_url":"https://api.github.com/users/Dmitry1987/followers","following_url":"https://api.github.com/users/Dmitry1987/following{/other_user}","gists_url":"https://api.github.com/users/Dmitry1987/gists{/gist_id}","starred_url":"https://api.github.com/users/Dmitry1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dmitry1987/subscriptions","organizations_url":"https://api.github.com/users/Dmitry1987/orgs","repos_url":"https://api.github.com/users/Dmitry1987/repos","events_url":"https://api.github.com/users/Dmitry1987/events{/privacy}","received_events_url":"https://api.github.com/users/Dmitry1987/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/aws","name":"aws","color":"c5def5"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/cloud","name":"cloud","color":"c7def8"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/waiting_on_maintainer","name":"waiting_on_maintainer","color":"d93f0b"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-04-26T12:08:13Z","updated_at":"2016-08-01T19:58:38Z","closed_at":"2016-08-01T19:23:52Z","body":"##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n<!--- Name of the plugin/module/task -->\r\nec2_eip\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.1.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\nN/A\r\n\r\n##### SUMMARY\r\nBasic usage of ec2_eip module has failed with error.\r\n\r\n##### STEPS TO REPRODUCE\r\n```\r\n- name: allocate a new elastic IP and associate it with an instance\r\n  ec2_eip: device_id=\"{{ ec2_cms.instance_ids }}\" region=\"{{ global.region }}\"\r\n  register: cms_eip\r\n\r\n- debug: msg=\"Allocated elastic IP for CMS is {{ cms_eip.public_ip }}\"\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nAssociate EIP\r\n\r\n##### ACTUAL RESULTS\r\nError:\r\n```\r\nTASK [ec2-create : allocate a new elastic IP and associate it with an instance] \r\n14:44:03\t\t\ttask path: /var/lib/rundeck/ansible-temp-run/appcloud-ansible/roles/ec2-create/tasks/ec2-cms.yml:22\r\n14:44:04\t\t\tAn exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: global name 'module' is not defined\r\n14:44:04\t\t\tfatal: [localhost]: FAILED! => {\"changed\": false, \"failed\": true, \"module_stderr\": \"Traceback (most recent call last):\\n  File \\\"/var/lib/rundeck/.ansible/tmp/ansible-tmp-1461671043.7-159857386516552/ec2_eip\\\", line 2705, in <module>\\n    main()\\n  File \\\"/var/lib/rundeck/.ansible/tmp/ansible-tmp-1461671043.7-159857386516552/ec2_eip\\\", line 356, in main\\n    module.check_mode, isinstance=is_instance)\\n  File \\\"/var/lib/rundeck/.ansible/tmp/ansible-tmp-1461671043.7-159857386516552/ec2_eip\\\", line 273, in ensure_present\\n    instance = find_device(ec2, device_id, isinstance=False)\\n  File \\\"/var/lib/rundeck/.ansible/tmp/ansible-tmp-1461671043.7-159857386516552/ec2_eip\\\", line 242, in find_device\\n    module.fail_json(msg=str(e))\\nNameError: global name 'module' is not defined\\n\", \"module_stdout\": \"\", \"msg\": \"MODULE FAILURE\", \"parsed\": false}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/236689498","html_url":"https://github.com/ansible/ansible-modules-core/issues/3549#issuecomment-236689498","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3549","id":236689498,"user":{"login":"rickmendes","id":892350,"avatar_url":"https://avatars.githubusercontent.com/u/892350?v=3","gravatar_id":"","url":"https://api.github.com/users/rickmendes","html_url":"https://github.com/rickmendes","followers_url":"https://api.github.com/users/rickmendes/followers","following_url":"https://api.github.com/users/rickmendes/following{/other_user}","gists_url":"https://api.github.com/users/rickmendes/gists{/gist_id}","starred_url":"https://api.github.com/users/rickmendes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickmendes/subscriptions","organizations_url":"https://api.github.com/users/rickmendes/orgs","repos_url":"https://api.github.com/users/rickmendes/repos","events_url":"https://api.github.com/users/rickmendes/events{/privacy}","received_events_url":"https://api.github.com/users/rickmendes/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T19:58:38Z","updated_at":"2016-08-01T19:58:38Z","body":"@cooktheryan I was testing it with instance_ids and was working. It is setup to work with both. The issue could be the way you are passing the ids. That does not look like an array. It looks like a string  \"['i-d5664345']\". Try ['i-d5664345'] or simply \"i-d5664345\" and see if you fair better."}}
{"actor":{"display_login":"rickmendes"}}