{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/43229","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/43229/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/43229/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/43229/events","html_url":"https://github.com/ansible/ansible/issues/43229","id":344190681,"node_id":"MDU6SXNzdWUzNDQxOTA2ODE=","number":43229,"title":"ec2_vpc_net not returning vpc id","user":{"login":"jandy33","id":41648652,"node_id":"MDQ6VXNlcjQxNjQ4NjUy","avatar_url":"https://avatars0.githubusercontent.com/u/41648652?v=4","gravatar_id":"","url":"https://api.github.com/users/jandy33","html_url":"https://github.com/jandy33","followers_url":"https://api.github.com/users/jandy33/followers","following_url":"https://api.github.com/users/jandy33/following{/other_user}","gists_url":"https://api.github.com/users/jandy33/gists{/gist_id}","starred_url":"https://api.github.com/users/jandy33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jandy33/subscriptions","organizations_url":"https://api.github.com/users/jandy33/orgs","repos_url":"https://api.github.com/users/jandy33/repos","events_url":"https://api.github.com/users/jandy33/events{/privacy}","received_events_url":"https://api.github.com/users/jandy33/received_events","type":"User","site_admin":false},"labels":[{"id":835286067,"node_id":"MDU6TGFiZWw4MzUyODYwNjc=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.6","name":"affects_2.6","color":"ededed","default":false},{"id":379680333,"node_id":"MDU6TGFiZWwzNzk2ODAzMzM=","url":"https://api.github.com/repos/ansible/ansible/labels/aws","name":"aws","color":"c5def5","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":61528803,"node_id":"MDU6TGFiZWw2MTUyODgwMw==","url":"https://api.github.com/repos/ansible/ansible/labels/cloud","name":"cloud","color":"c7def8","default":false},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":503572087,"node_id":"MDU6TGFiZWw1MDM1NzIwODc=","url":"https://api.github.com/repos/ansible/ansible/labels/needs_triage","name":"needs_triage","color":"0e8a16","default":false},{"id":636352796,"node_id":"MDU6TGFiZWw2MzYzNTI3OTY=","url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false},{"id":942378949,"node_id":"MDU6TGFiZWw5NDIzNzg5NDk=","url":"https://api.github.com/repos/ansible/ansible/labels/traceback","name":"traceback","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-24T20:26:07Z","updated_at":"2018-07-26T00:52:02Z","closed_at":null,"author_association":"NONE","body":"<!---\r\nVerify first that your issue/request is not already reported on GitHub.\r\nTHIS FORM WILL BE READ BY A MACHINE, COMPLETE ALL SECTIONS AS DESCRIBED.\r\nAlso test if the latest release, and devel branch are affected too.\r\nALWAYS add information AFTER (OUTSIDE) these html comments.\r\nOtherwise it may end up being automatically closed by our bot. -->\r\n\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\nec2_vpc_net not returning vpc_id for new create VPC\r\n\r\n##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n<!--- Insert, BELOW THIS COMMENT, the name of the module, plugin, task or feature.\r\nDo not include extra details here, e.g. \"vyos_command\" not \"the network module vyos_command\" or the full path-->\r\nec2_vpc_net\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste, BELOW THIS COMMENT, verbatim output from \"ansible --version\" between quotes below -->\r\n```\r\nansible 2.6.0\r\n   config file = /home/jim/ansible/config/ansbile.cfg\r\n   configured module search path = [u'/home/jim/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /home/jim/ansible/lib/python2.7/site-packages\r\n  executable location = /home/jim/ansible/bin/ansible\r\n  python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Head 4.8.5-16)]\r\n```\r\n\r\n##### CONFIGURATION\r\n<!--- If using Ansible 2.4 or above, paste, BELOW THIS COMMENT, the results of \"ansible-config dump --only-changed\"\r\nOtherwise, mention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).-->\r\nDEFAULT_HOST_LIST(/home/jim/ansible/config/ansible.cfg = [u'/home/jim/ansible/inventory/hosts.ini\r\nDEFAULT_LOG_PATY(/home/jim/ansible/config/ansible.cfg = /home/jim/ansible/log/ansible.log\r\nDEFAULT_TIMEOUT(/home/jim/ansible/config/ansible.cfg) = 5\r\nHOST_KEY_CHECKING(/home/jim/ansible/config/ansible.cfg) = False\r\n\r\n##### OS / ENVIRONMENT\r\n<!--- Mention, BELOW THIS COMMENT, the OS you are running Ansible from, and the OS you are\r\nmanaging, or say \"N/A\" for anything that is not platform-specific.\r\nAlso mention the specific version of what you are trying to control,\r\ne.g. if this is a network bug the version of firmware on the network device.-->\r\nCentos7\r\n\r\n##### STEPS TO REPRODUCE\r\n<!--- For bugs, show exactly how to reproduce the problem, using a minimal test-case.\r\nFor new features, show how the feature would be used. -->\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```yaml\r\n---\r\n- hosts: localhost\r\n  connection: local\r\n  gather_facts: no\r\n  vars:\r\n    ec2_name_prefix: testvpc\r\n    ec2_vpc_subnet: \"172.16.0.0/24\"\r\n    ec2_region: us-east-1\r\n\r\n  tasks:\r\n    - name: Create AWS VPC SEAN-MAY9-vpc\r\n      ec2_vpc_net:\r\n        name: \"{{ ec2_name_prefix }}-vpc\"\r\n        cidr_block: \"{{ ec2_vpc_subnet }}\"\r\n        region: \"{{ ec2_region }}\"\r\n        state: present\r\n        tags:\r\n          Name: \"{{ ec2_name_prefix }}\"\r\n          Request_ID: \"REQXXXXXX\"\r\n      register: create_vpc\r\n   - name: Checking vpc id\r\n      debug:\r\n          msg: \"{{ create_vpc.vpc.id }}\"\r\n```\r\n<!--- You can also paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\n<!--- What did you expect to happen when running the steps above? -->\r\nThe vpc id is returned\r\n\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\nThe full traceback is:\r\nTraceback (most recent call last):\r\n     File \"/tmp/ansible_3CMWLo/ansible_module_ec2_vpc_net.py\", line 444. in main\r\n       Filters=[{'Name':'cidr-block-association.cidr-block', 'Values':expected_cidrs}\"\r\n     File \"/usr/share/awscli/lib/python2.7/site-packages/botocore/waiter.py\", lime 53 in wait\r\n        Waiter.wait(self, **kwargs)\r\n     File \"/usr/share/awscli/lib/python2.7/site-package/botocore/waiter.py\",\r\n line 329, in wait\r\n        last_response=response\r\n\r\nfatal: [localhost]: FAILED! => {\r\n     \"boto3_version\":\"1.4.6\"\r\n     \"botocore_version\": \"1.10.28\"\r\n     \"changed\" : false,\r\n     \"invocation\" : {\r\n           \"module_args\" : {\r\n                 \"cidr_block\":[\r\n                       \"172.16.0.0/24\" \r\n                   ],\r\n                 \"region\" : \"us-east-1\",\r\n                 \"name\" : \"testvpc-vpc\",\r\n                 \"tags\" : {\r\n                      \"Name:\" \"testvpc\"\r\n                      \"Request_ID\": \"REQXXXXXX\"\r\n                  }\r\n                 \"tenancy\": \"default\",\r\n           }\r\n    },\r\n    \"msg\" : \"Failed to wat for CIDR's to update: Waiter VpcAvailable failed: Max attempts exceeded\"\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/407941268","html_url":"https://github.com/ansible/ansible/issues/43229#issuecomment-407941268","issue_url":"https://api.github.com/repos/ansible/ansible/issues/43229","id":407941268,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzk0MTI2OA==","user":{"login":"ZuZuD","id":19931768,"node_id":"MDQ6VXNlcjE5OTMxNzY4","avatar_url":"https://avatars1.githubusercontent.com/u/19931768?v=4","gravatar_id":"","url":"https://api.github.com/users/ZuZuD","html_url":"https://github.com/ZuZuD","followers_url":"https://api.github.com/users/ZuZuD/followers","following_url":"https://api.github.com/users/ZuZuD/following{/other_user}","gists_url":"https://api.github.com/users/ZuZuD/gists{/gist_id}","starred_url":"https://api.github.com/users/ZuZuD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZuZuD/subscriptions","organizations_url":"https://api.github.com/users/ZuZuD/orgs","repos_url":"https://api.github.com/users/ZuZuD/repos","events_url":"https://api.github.com/users/ZuZuD/events{/privacy}","received_events_url":"https://api.github.com/users/ZuZuD/received_events","type":"User","site_admin":false},"created_at":"2018-07-26T00:52:02Z","updated_at":"2018-07-26T00:52:02Z","author_association":"CONTRIBUTOR","body":"Hi @jandy33,\r\n\r\nI was unable to reproduce your issue using the same component versions (see below). However there is something unclear here, the error is from a section related to addition/removal of a non-primary CIDR and considering the playbook only have one cidr_block you shouldn't go there... Can you provide more details?\r\n\r\n```\r\n~/ansible ansible-playbook post_vpc.yml\r\n [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit\r\nlocalhost does not match 'all'\r\n\r\nPLAY [localhost] ************************************************************************************\r\n\r\nTASK [Create AWS VPC SEAN-MAY9-vpc] *****************************************************************\r\nok: [localhost]\r\n\r\nTASK [Checking vpc id] ******************************************************************************\r\nok: [localhost] => {\r\n    \"msg\": \"vpc-f07bbXXX\"\r\n}\r\n\r\nTASK [Destroy AWS VPC SEAN-MAY9-vpc] ****************************************************************\r\nok: [localhost]\r\n\r\nPLAY RECAP ******************************************************************************************\r\nlocalhost                  : ok=3    changed=0    unreachable=0    failed=0\r\n\r\n$ ~/ansible pip list |grep boto\r\nboto3 (1.4.6)\r\nbotocore (1.10.28)\r\n$ ~/ansible ansible --version\r\nansible 2.6.0 (detached HEAD 8ce3bd6dea) last updated 2018/07/25 23:59:12 (GMT +000)\r\n  config file = /root/ansible/ansible.cfg\r\n  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/site-packages/ansible-2.6.0-py2.7.egg/ansible\r\n  executable location = /bin/ansible\r\n  python version = 2.7.5 (default, Aug  4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]"}}
{"actor":{"display_login":"ZuZuD"}}