{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3444","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3444/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3444/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3444/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/3444","id":148620957,"number":3444,"title":"ec2_elb_lb module seems to now expect a backend policy configuration object","user":{"login":"daniel-rhoades","id":11665063,"avatar_url":"https://avatars.githubusercontent.com/u/11665063?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-rhoades","html_url":"https://github.com/daniel-rhoades","followers_url":"https://api.github.com/users/daniel-rhoades/followers","following_url":"https://api.github.com/users/daniel-rhoades/following{/other_user}","gists_url":"https://api.github.com/users/daniel-rhoades/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-rhoades/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-rhoades/subscriptions","organizations_url":"https://api.github.com/users/daniel-rhoades/orgs","repos_url":"https://api.github.com/users/daniel-rhoades/repos","events_url":"https://api.github.com/users/daniel-rhoades/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-rhoades/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"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/milestones/1","html_url":"https://github.com/ansible/ansible-modules-core/milestones/stable-2.1","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/milestones/1/labels","id":996115,"number":1,"title":"stable-2.1","description":"","creator":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"open_issues":27,"closed_issues":114,"state":"open","created_at":"2015-02-26T01:01:13Z","updated_at":"2016-07-25T19:01:37Z","due_on":null,"closed_at":null},"comments":38,"created_at":"2016-04-15T10:17:56Z","updated_at":"2016-07-28T21:02:40Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\nhttps://github.com/ansible/ansible-modules-core/blob/devel/cloud/amazon/ec2_elb_lb.py\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.1.0\r\n  config file = \r\n  configured module search path = Default w/o overrides\r\n```\r\nBuilt from source as of 14/04/16.\r\n\r\n##### CONFIGURATION\r\n```\r\nANSIBLE_HOSTS=\"/etc/ansible/ec2.py\"\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\nBuilt from source using Vagrant using my project: https://github.com/daniel-rhoades/ansible-environment\r\n\r\n##### SUMMARY\r\nec2_elb_lb module seems to now expect a backend policy configuration object.\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\n1. Build Ansible from latest source (https://github.com/daniel-rhoades/ansible-environment);\r\n2. Run playbook that provisions an ELB like so:\r\n\r\n```\r\n- name: \"AWS | ELB | Create an ELB service\"\r\n    local_action:\r\n      module: ec2_elb_lb\r\n      name: \"{{ elb_name }}\"\r\n      security_group_ids: \"{{ elb_security_groups }}\"\r\n      state: \"{{ ec2_elb_state }}\"\r\n      region: \"{{ elb_region }}\"\r\n      subnets: \"{{ elb_subnets }}\"\r\n      purge_subnets: \"{{ elb_purge_subnets }}\"\r\n      cross_az_load_balancing: \"{{ elb_cross_az_load_balancing }}\"\r\n      connection_draining_timeout: \"{{ elb_connection_draining_timeout }}\"\r\n      listeners: \"{{ elb_listeners }}\"\r\n      health_check: \"{{ elb_health_check }}\"\r\n```\r\n\r\nThe relevant variables were:\r\n```\r\nelb_purge_subnets: yes\r\nelb_cross_az_load_balancing: yes\r\nelb_connection_draining_timeout: 60\r\nec2_elb_state: \"present\"\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nELB should be created with the expected listeners without any errors being thrown.\r\n\r\n##### ACTUAL RESULTS\r\nELB is actually actually created, but the ec_elb_lb module errors:\r\n\r\n```\r\n<localhost> ESTABLISH LOCAL CONNECTION FOR USER: vagrant\r\n<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1460713711.64-1526427716965 `\" && echo \"` echo $HOME/.ansible/tmp/ansible-tmp-1460713711.64-1526427716965 `\" )'\r\n<localhost> PUT /tmp/tmpft5jGK TO /home/vagrant/.ansible/tmp/ansible-tmp-1460713711.64-1526427716965/ec2_elb_lb\r\n<localhost> EXEC /bin/sh -c 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1460713711.64-1526427716965/ec2_elb_lb; rm -rf \"/home/vagrant/.ansible/tmp/ansible-tmp-1460713711.64-1526427716965/\" > /dev/null 2>&1'\r\nAn exception occurred during task execution. The full traceback is:\r\nTraceback (most recent call last):\r\n  File \"/tmp/ansible_ndti8P/ansible_module_ec2_elb_lb.py\", line 1208, in <module>\r\n    main()\r\n  File \"/tmp/ansible_ndti8P/ansible_module_ec2_elb_lb.py\", line 1192, in main\r\n    elb_man.ensure_ok()\r\n  File \"/tmp/ansible_ndti8P/ansible_module_ec2_elb_lb.py\", line 431, in ensure_ok\r\n    self._set_backend_policies()\r\n  File \"/tmp/ansible_ndti8P/ansible_module_ec2_elb_lb.py\", line 1007, in _set_backend_policies\r\n    backend_policies = self._get_backend_policies()\r\n  File \"/tmp/ansible_ndti8P/ansible_module_ec2_elb_lb.py\", line 999, in _get_backend_policies\r\n    str(backend.instance_port) + ':' + policy.policy_name for backend in self.elb.backends\r\nTypeError: 'NoneType' object is not iterable\r\n\r\nfatal: [localhost -> localhost]: FAILED! => {\"changed\": false, \"failed\": true, \"invocation\": {\"module_name\": \"ec2_elb_lb\"}, \"module_stderr\": \"Traceback (most recent call last):\\n  File \\\"/tmp/ansible_ndti8P/ansible_module_ec2_elb_lb.py\\\", line 1208, in <module>\\n    main()\\n  File \\\"/tmp/ansible_ndti8P/ansible_module_ec2_elb_lb.py\\\", line 1192, in main\\n    elb_man.ensure_ok()\\n  File \\\"/tmp/ansible_ndti8P/ansible_module_ec2_elb_lb.py\\\", line 431, in ensure_ok\\n    self._set_backend_policies()\\n  File \\\"/tmp/ansible_ndti8P/ansible_module_ec2_elb_lb.py\\\", line 1007, in _set_backend_policies\\n    backend_policies = self._get_backend_policies()\\n  File \\\"/tmp/ansible_ndti8P/ansible_module_ec2_elb_lb.py\\\", line 999, in _get_backend_policies\\n    str(backend.instance_port) + ':' + policy.policy_name for backend in self.elb.backends\\nTypeError: 'NoneType' object is not iterable\\n\", \"module_stdout\": \"\", \"msg\": \"MODULE FAILURE\", \"parsed\": false}\r\n```\r\n\r\nIf I re-run the playbook no error occurs since the ELB was created successfully."},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/236024305","html_url":"https://github.com/ansible/ansible-modules-core/issues/3444#issuecomment-236024305","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3444","id":236024305,"user":{"login":"krbullock","id":127835,"avatar_url":"https://avatars.githubusercontent.com/u/127835?v=3","gravatar_id":"","url":"https://api.github.com/users/krbullock","html_url":"https://github.com/krbullock","followers_url":"https://api.github.com/users/krbullock/followers","following_url":"https://api.github.com/users/krbullock/following{/other_user}","gists_url":"https://api.github.com/users/krbullock/gists{/gist_id}","starred_url":"https://api.github.com/users/krbullock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krbullock/subscriptions","organizations_url":"https://api.github.com/users/krbullock/orgs","repos_url":"https://api.github.com/users/krbullock/repos","events_url":"https://api.github.com/users/krbullock/events{/privacy}","received_events_url":"https://api.github.com/users/krbullock/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T21:02:40Z","updated_at":"2016-07-28T21:02:40Z","body":"This appears to be fixed in 2.1.1. I just ran into the issue on 2.1.0, upgraded and now it works."}}
{"actor":{"display_login":"krbullock"}}