{"action":"opened","number":2592,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/2592","id":52137668,"html_url":"https://github.com/ansible/ansible-modules-core/pull/2592","diff_url":"https://github.com/ansible/ansible-modules-core/pull/2592.diff","patch_url":"https://github.com/ansible/ansible-modules-core/pull/2592.patch","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2592","number":2592,"state":"open","locked":false,"title":"Fix ec2.py bug when it does not respect network_id","user":{"login":"akazakov","id":47600,"avatar_url":"https://avatars.githubusercontent.com/u/47600?v=3","gravatar_id":"","url":"https://api.github.com/users/akazakov","html_url":"https://github.com/akazakov","followers_url":"https://api.github.com/users/akazakov/followers","following_url":"https://api.github.com/users/akazakov/following{/other_user}","gists_url":"https://api.github.com/users/akazakov/gists{/gist_id}","starred_url":"https://api.github.com/users/akazakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akazakov/subscriptions","organizations_url":"https://api.github.com/users/akazakov/orgs","repos_url":"https://api.github.com/users/akazakov/repos","events_url":"https://api.github.com/users/akazakov/events{/privacy}","received_events_url":"https://api.github.com/users/akazakov/received_events","type":"User","site_admin":false},"body":"If instance already exists, but in a differnet VPC, we should\r\nnot count towards exact_count\r\n\r\nExample\r\n-------\r\n\r\nImagine the followin situation\r\n\r\nVPC_A:\r\n  Subnet_A:\r\n    Instance1:\r\n      Tags:\r\n        Name: my_instance\r\n\r\nVPC_B:\r\n  Subnet_B: {}\r\n\r\nNow if we call ec2 module:\r\n\r\nec2:\r\n  image_id: ...\r\n  vpc_subnet_id: Subnet_B\r\n  exact_count: 1\r\n    count_tag:\r\n      Name: \"my_instance\"\r\n\r\nWithout the fix, this will result in no-op, as if instance was present in\r\nSubnet_B\r\n\r\nEven weirder behaviour would be observed if you call it with exact_count\r\n> 1, because now you'd end up with some copies in the right subnet, and\r\n1 in the wrong (Subnet_A)\r\n\r\nWith the fix, it will create necessary count in Subnet_B and ignore\r\nSubnet_A","created_at":"2015-11-30T15:28:06Z","updated_at":"2015-11-30T15:28:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/2592/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/2592/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2592/comments","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-core/statuses/4a4a0d8be183965d3a5392f22e1018718244145c","head":{"label":"akazakov:devel","ref":"devel","sha":"4a4a0d8be183965d3a5392f22e1018718244145c","user":{"login":"akazakov","id":47600,"avatar_url":"https://avatars.githubusercontent.com/u/47600?v=3","gravatar_id":"","url":"https://api.github.com/users/akazakov","html_url":"https://github.com/akazakov","followers_url":"https://api.github.com/users/akazakov/followers","following_url":"https://api.github.com/users/akazakov/following{/other_user}","gists_url":"https://api.github.com/users/akazakov/gists{/gist_id}","starred_url":"https://api.github.com/users/akazakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akazakov/subscriptions","organizations_url":"https://api.github.com/users/akazakov/orgs","repos_url":"https://api.github.com/users/akazakov/repos","events_url":"https://api.github.com/users/akazakov/events{/privacy}","received_events_url":"https://api.github.com/users/akazakov/received_events","type":"User","site_admin":false},"repo":{"id":37561936,"name":"ansible-modules-core","full_name":"akazakov/ansible-modules-core","owner":{"login":"akazakov","id":47600,"avatar_url":"https://avatars.githubusercontent.com/u/47600?v=3","gravatar_id":"","url":"https://api.github.com/users/akazakov","html_url":"https://github.com/akazakov","followers_url":"https://api.github.com/users/akazakov/followers","following_url":"https://api.github.com/users/akazakov/following{/other_user}","gists_url":"https://api.github.com/users/akazakov/gists{/gist_id}","starred_url":"https://api.github.com/users/akazakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akazakov/subscriptions","organizations_url":"https://api.github.com/users/akazakov/orgs","repos_url":"https://api.github.com/users/akazakov/repos","events_url":"https://api.github.com/users/akazakov/events{/privacy}","received_events_url":"https://api.github.com/users/akazakov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akazakov/ansible-modules-core","description":"Ansible modules - these modules ship with ansible","fork":true,"url":"https://api.github.com/repos/akazakov/ansible-modules-core","forks_url":"https://api.github.com/repos/akazakov/ansible-modules-core/forks","keys_url":"https://api.github.com/repos/akazakov/ansible-modules-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akazakov/ansible-modules-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akazakov/ansible-modules-core/teams","hooks_url":"https://api.github.com/repos/akazakov/ansible-modules-core/hooks","issue_events_url":"https://api.github.com/repos/akazakov/ansible-modules-core/issues/events{/number}","events_url":"https://api.github.com/repos/akazakov/ansible-modules-core/events","assignees_url":"https://api.github.com/repos/akazakov/ansible-modules-core/assignees{/user}","branches_url":"https://api.github.com/repos/akazakov/ansible-modules-core/branches{/branch}","tags_url":"https://api.github.com/repos/akazakov/ansible-modules-core/tags","blobs_url":"https://api.github.com/repos/akazakov/ansible-modules-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akazakov/ansible-modules-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akazakov/ansible-modules-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/akazakov/ansible-modules-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akazakov/ansible-modules-core/statuses/{sha}","languages_url":"https://api.github.com/repos/akazakov/ansible-modules-core/languages","stargazers_url":"https://api.github.com/repos/akazakov/ansible-modules-core/stargazers","contributors_url":"https://api.github.com/repos/akazakov/ansible-modules-core/contributors","subscribers_url":"https://api.github.com/repos/akazakov/ansible-modules-core/subscribers","subscription_url":"https://api.github.com/repos/akazakov/ansible-modules-core/subscription","commits_url":"https://api.github.com/repos/akazakov/ansible-modules-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/akazakov/ansible-modules-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/akazakov/ansible-modules-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/akazakov/ansible-modules-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/akazakov/ansible-modules-core/contents/{+path}","compare_url":"https://api.github.com/repos/akazakov/ansible-modules-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akazakov/ansible-modules-core/merges","archive_url":"https://api.github.com/repos/akazakov/ansible-modules-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akazakov/ansible-modules-core/downloads","issues_url":"https://api.github.com/repos/akazakov/ansible-modules-core/issues{/number}","pulls_url":"https://api.github.com/repos/akazakov/ansible-modules-core/pulls{/number}","milestones_url":"https://api.github.com/repos/akazakov/ansible-modules-core/milestones{/number}","notifications_url":"https://api.github.com/repos/akazakov/ansible-modules-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akazakov/ansible-modules-core/labels{/name}","releases_url":"https://api.github.com/repos/akazakov/ansible-modules-core/releases{/id}","created_at":"2015-06-16T23:45:05Z","updated_at":"2015-06-16T23:45:06Z","pushed_at":"2015-11-21T13:40:11Z","git_url":"git://github.com/akazakov/ansible-modules-core.git","ssh_url":"git@github.com:akazakov/ansible-modules-core.git","clone_url":"https://github.com/akazakov/ansible-modules-core.git","svn_url":"https://github.com/akazakov/ansible-modules-core","homepage":"","size":8267,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"c6fdd3809f8bc2a81142197db7fd1acd9f1f0305","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":24474126,"name":"ansible-modules-core","full_name":"ansible/ansible-modules-core","owner":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible-modules-core","description":"Ansible modules - these modules ship with ansible","fork":false,"url":"https://api.github.com/repos/ansible/ansible-modules-core","forks_url":"https://api.github.com/repos/ansible/ansible-modules-core/forks","keys_url":"https://api.github.com/repos/ansible/ansible-modules-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible-modules-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible-modules-core/teams","hooks_url":"https://api.github.com/repos/ansible/ansible-modules-core/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/events","assignees_url":"https://api.github.com/repos/ansible/ansible-modules-core/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible-modules-core/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible-modules-core/tags","blobs_url":"https://api.github.com/repos/ansible/ansible-modules-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible-modules-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible-modules-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible-modules-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-core/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible-modules-core/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible-modules-core/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible-modules-core/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible-modules-core/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible-modules-core/subscription","commits_url":"https://api.github.com/repos/ansible/ansible-modules-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible-modules-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible-modules-core/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible-modules-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible-modules-core/merges","archive_url":"https://api.github.com/repos/ansible/ansible-modules-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible-modules-core/downloads","issues_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible-modules-core/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible-modules-core/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible-modules-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible-modules-core/releases{/id}","created_at":"2014-09-25T20:28:25Z","updated_at":"2015-11-27T15:40:54Z","pushed_at":"2015-11-30T15:24:12Z","git_url":"git://github.com/ansible/ansible-modules-core.git","ssh_url":"git@github.com:ansible/ansible-modules-core.git","clone_url":"https://github.com/ansible/ansible-modules-core.git","svn_url":"https://github.com/ansible/ansible-modules-core","homepage":"","size":10386,"stargazers_count":488,"watchers_count":488,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1184,"mirror_url":null,"open_issues_count":800,"forks":1184,"open_issues":800,"watchers":488,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/2592"},"html":{"href":"https://github.com/ansible/ansible-modules-core/pull/2592"},"issue":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2592"},"comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2592/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/2592/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/pulls/2592/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible-modules-core/statuses/4a4a0d8be183965d3a5392f22e1018718244145c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":20,"deletions":14,"changed_files":1}}