{"action":"opened","number":3356,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/3356","id":92189925,"html_url":"https://github.com/ansible/ansible-modules-extras/pull/3356","diff_url":"https://github.com/ansible/ansible-modules-extras/pull/3356.diff","patch_url":"https://github.com/ansible/ansible-modules-extras/pull/3356.patch","issue_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/3356","number":3356,"state":"open","locked":false,"title":"s3_bucket: initialize Versioning attribute when undefined","user":{"login":"martin-paulus","id":11751539,"avatar_url":"https://avatars.githubusercontent.com/u/11751539?v=3","gravatar_id":"","url":"https://api.github.com/users/martin-paulus","html_url":"https://github.com/martin-paulus","followers_url":"https://api.github.com/users/martin-paulus/followers","following_url":"https://api.github.com/users/martin-paulus/following{/other_user}","gists_url":"https://api.github.com/users/martin-paulus/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-paulus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-paulus/subscriptions","organizations_url":"https://api.github.com/users/martin-paulus/orgs","repos_url":"https://api.github.com/users/martin-paulus/repos","events_url":"https://api.github.com/users/martin-paulus/events{/privacy}","received_events_url":"https://api.github.com/users/martin-paulus/received_events","type":"User","site_admin":false},"body":"##### ISSUE TYPE\r\n - Bugfix Pull Request\r\n\r\n##### COMPONENT NAME\r\ns3_bucket.py\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.3.0\r\n```\r\n(current devel branch)\r\n\r\n##### SUMMARY\r\nThe versioning attribute was not set for new S3 buckets even if you explicitly set the versioning boolean to true ('yes').\r\n\r\nThis is a regression from an earlier incarnation of the module (in ansible-2.1.1.0). However, that version of the module was unusable due to broken json parsing of the bucket policy.\r\n\r\nThe current version of the module on the devel branch was broken because the response from Amazon resulted in an empty dictionary. While this module assumed the 'Versioning' attribute was at least present (it checks whether its value != \"Enabled\").\r\n\r\nMy suggested fix is to initialize the 'Versioning' attribute to \"Disabled\" in case the dictionary is empty. This way the rest of the module functions as it should.\r\n\r\n```\r\nRelevant output is absent because the module did not fail. Instead versioning was simply not set on newly created S3 buckets.\r\n```","created_at":"2016-11-03T16:26:10Z","updated_at":"2016-11-03T16:26:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/3356/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/3356/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/3356/comments","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/11be84086069ffcd44596c80d22aaee4bb104635","head":{"label":"martin-paulus:s3_bucket_versioning_fix","ref":"s3_bucket_versioning_fix","sha":"11be84086069ffcd44596c80d22aaee4bb104635","user":{"login":"martin-paulus","id":11751539,"avatar_url":"https://avatars.githubusercontent.com/u/11751539?v=3","gravatar_id":"","url":"https://api.github.com/users/martin-paulus","html_url":"https://github.com/martin-paulus","followers_url":"https://api.github.com/users/martin-paulus/followers","following_url":"https://api.github.com/users/martin-paulus/following{/other_user}","gists_url":"https://api.github.com/users/martin-paulus/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-paulus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-paulus/subscriptions","organizations_url":"https://api.github.com/users/martin-paulus/orgs","repos_url":"https://api.github.com/users/martin-paulus/repos","events_url":"https://api.github.com/users/martin-paulus/events{/privacy}","received_events_url":"https://api.github.com/users/martin-paulus/received_events","type":"User","site_admin":false},"repo":{"id":72764301,"name":"ansible-modules-extras","full_name":"martin-paulus/ansible-modules-extras","owner":{"login":"martin-paulus","id":11751539,"avatar_url":"https://avatars.githubusercontent.com/u/11751539?v=3","gravatar_id":"","url":"https://api.github.com/users/martin-paulus","html_url":"https://github.com/martin-paulus","followers_url":"https://api.github.com/users/martin-paulus/followers","following_url":"https://api.github.com/users/martin-paulus/following{/other_user}","gists_url":"https://api.github.com/users/martin-paulus/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-paulus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-paulus/subscriptions","organizations_url":"https://api.github.com/users/martin-paulus/orgs","repos_url":"https://api.github.com/users/martin-paulus/repos","events_url":"https://api.github.com/users/martin-paulus/events{/privacy}","received_events_url":"https://api.github.com/users/martin-paulus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martin-paulus/ansible-modules-extras","description":"Ansible extra modules - these modules ship with ansible","fork":true,"url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras","forks_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/forks","keys_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/teams","hooks_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/hooks","issue_events_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/issues/events{/number}","events_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/events","assignees_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/assignees{/user}","branches_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/branches{/branch}","tags_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/tags","blobs_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/languages","stargazers_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/stargazers","contributors_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/contributors","subscribers_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/subscribers","subscription_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/subscription","commits_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/contents/{+path}","compare_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/merges","archive_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/downloads","issues_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/issues{/number}","pulls_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/labels{/name}","releases_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/releases{/id}","deployments_url":"https://api.github.com/repos/martin-paulus/ansible-modules-extras/deployments","created_at":"2016-11-03T16:22:35Z","updated_at":"2016-11-03T16:22:42Z","pushed_at":"2016-11-03T16:23:21Z","git_url":"git://github.com/martin-paulus/ansible-modules-extras.git","ssh_url":"git@github.com:martin-paulus/ansible-modules-extras.git","clone_url":"https://github.com/martin-paulus/ansible-modules-extras.git","svn_url":"https://github.com/martin-paulus/ansible-modules-extras","homepage":"","size":55369,"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":"e4bc6189563a52e64a0ff60c05fc4221a393324b","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":24474138,"name":"ansible-modules-extras","full_name":"ansible/ansible-modules-extras","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-extras","description":"Ansible extra modules - these modules ship with ansible","fork":false,"url":"https://api.github.com/repos/ansible/ansible-modules-extras","forks_url":"https://api.github.com/repos/ansible/ansible-modules-extras/forks","keys_url":"https://api.github.com/repos/ansible/ansible-modules-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible-modules-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible-modules-extras/teams","hooks_url":"https://api.github.com/repos/ansible/ansible-modules-extras/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/events","assignees_url":"https://api.github.com/repos/ansible/ansible-modules-extras/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible-modules-extras/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible-modules-extras/tags","blobs_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible-modules-extras/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible-modules-extras/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible-modules-extras/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible-modules-extras/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible-modules-extras/subscription","commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible-modules-extras/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible-modules-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible-modules-extras/merges","archive_url":"https://api.github.com/repos/ansible/ansible-modules-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible-modules-extras/downloads","issues_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible-modules-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible-modules-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible-modules-extras/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/deployments","created_at":"2014-09-25T20:28:42Z","updated_at":"2016-11-02T19:44:49Z","pushed_at":"2016-11-03T16:06:57Z","git_url":"git://github.com/ansible/ansible-modules-extras.git","ssh_url":"git@github.com:ansible/ansible-modules-extras.git","clone_url":"https://github.com/ansible/ansible-modules-extras.git","svn_url":"https://github.com/ansible/ansible-modules-extras","homepage":"","size":55369,"stargazers_count":763,"watchers_count":763,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1589,"mirror_url":null,"open_issues_count":694,"forks":1589,"open_issues":694,"watchers":763,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/3356"},"html":{"href":"https://github.com/ansible/ansible-modules-extras/pull/3356"},"issue":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/3356"},"comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/3356/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/3356/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/3356/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/11be84086069ffcd44596c80d22aaee4bb104635"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"martin-paulus"}}