{"action":"opened","number":3313,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/3313","id":91343456,"html_url":"https://github.com/ansible/ansible-modules-extras/pull/3313","diff_url":"https://github.com/ansible/ansible-modules-extras/pull/3313.diff","patch_url":"https://github.com/ansible/ansible-modules-extras/pull/3313.patch","issue_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/3313","number":3313,"state":"open","locked":false,"title":"filesystem: get BTRFS size, add swap support","user":{"login":"romain-dartigues","id":393859,"avatar_url":"https://avatars.githubusercontent.com/u/393859?v=3","gravatar_id":"","url":"https://api.github.com/users/romain-dartigues","html_url":"https://github.com/romain-dartigues","followers_url":"https://api.github.com/users/romain-dartigues/followers","following_url":"https://api.github.com/users/romain-dartigues/following{/other_user}","gists_url":"https://api.github.com/users/romain-dartigues/gists{/gist_id}","starred_url":"https://api.github.com/users/romain-dartigues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romain-dartigues/subscriptions","organizations_url":"https://api.github.com/users/romain-dartigues/orgs","repos_url":"https://api.github.com/users/romain-dartigues/repos","events_url":"https://api.github.com/users/romain-dartigues/events{/privacy}","received_events_url":"https://api.github.com/users/romain-dartigues/received_events","type":"User","site_admin":false},"body":"##### ISSUE TYPE\r\n - Feature Pull Request\r\n - Bugfix Pull Request\r\n\r\n##### COMPONENT NAME\r\n- filesystem\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.1.2.0\r\n```\r\n\r\n##### SUMMARY\r\n\r\n**Note:** I'm suggesting two changes in one PR, let me know if you want me to split them.\r\n\r\n* 4266b1a aggregate failures (minor code design)\r\n* b46232c get device size for btrfs which was a TODO from @alxgu set in 8d7b1b0[`L101`](https://github.com/ansible/ansible-modules-extras/commit/8d7b1b0bd6be864ef56da80b3c4bd6174c52bb54#diff-bcf0d32808383c48cad077b45e5225b9R101)\r\n* c7ae654 introduce swap (new feature!)\r\n\r\nI consider the swap as a new feature *and* a bug.\r\n\r\nBefore the patch (`/dev/DATA/swap` is an empty, newly created LV):\r\n```yaml\r\n- name: mkswap\r\n  filesystem: fstype=swap dev=/dev/DATA/swap\r\n```\r\n\r\nReturned:\r\n```\r\nok: [docker02] => (item={u'fs_vfstype': u'swap', u'fs_spec': u'/dev/DATA/swap', u'size': u'2G'})\r\n```\r\n\r\nBut on the target, nothing much happened:\r\n```console\r\nroot@docker02:~# blkid /dev/DATA/swap\r\nroot@docker02:~# file -Ls /dev/DATA/swap\r\n/dev/DATA/swap: data\r\n```\r\n\r\nAfter the patch, the playbook says:\r\n```\r\nchanged: [docker02] => (item={u'fs_vfstype': u'swap', u'fs_spec': u'/dev/DATA/swap', u'size': u'2G'})\r\n```\r\n\r\nNow on the target:\r\n```console\r\nroot@docker02:~# blkid /dev/DATA/swap\r\n/dev/DATA/swap: UUID=\"40fc8cb4-f18a-4693-85e4-189b52ff66b3\" TYPE=\"swap\"\r\nroot@docker02:~# file -Ls /dev/DATA/swap\r\n/dev/DATA/swap: Linux/i386 swap file (new style), version 1 (4K pages), size 524287 pages, no label, UUID=40fc8cb4-f18a-4693-85e4-189b52ff66b3\r\n```\r\n\r\nThanks to the existing code, the swap functionality is idempotent and when re-run will detect the FS is already a swap:\r\n```\r\nok: [docker02] => (item={u'fs_vfstype': u'swap', u'fs_spec': u'/dev/DATA/swap', u'size': u'2G'})\r\n```\r\n\r\nThe target is:\r\n```\r\nNo LSB modules are available.\r\nDistributor ID: Ubuntu\r\nDescription:    Ubuntu 14.04.4 LTS\r\nRelease:        14.04\r\nCodename:       trusty\r\n````\r\n\r\n##### Questions\r\n\r\nI would like to use this opportunity to ask your opinion about a few things about some file systems:\r\n* some don't support shrinking\r\n* some *need* to be **mounted** in order to resize\r\n* some *need* to be **un-mounted** in order to resize\r\n* this plugin could check if the FS is in use before proceeding\r\n\r\nIs it worth to make it slightly more complex and fool-proof, or is it assumed the user has the full responsibility over his doing?","created_at":"2016-10-28T08:46:08Z","updated_at":"2016-10-28T08:46:08Z","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/3313/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/3313/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/3313/comments","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/c7ae6549eea745e4e197d3982e35f90d0d86904c","head":{"label":"romain-dartigues:rdartigues.fs","ref":"rdartigues.fs","sha":"c7ae6549eea745e4e197d3982e35f90d0d86904c","user":{"login":"romain-dartigues","id":393859,"avatar_url":"https://avatars.githubusercontent.com/u/393859?v=3","gravatar_id":"","url":"https://api.github.com/users/romain-dartigues","html_url":"https://github.com/romain-dartigues","followers_url":"https://api.github.com/users/romain-dartigues/followers","following_url":"https://api.github.com/users/romain-dartigues/following{/other_user}","gists_url":"https://api.github.com/users/romain-dartigues/gists{/gist_id}","starred_url":"https://api.github.com/users/romain-dartigues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romain-dartigues/subscriptions","organizations_url":"https://api.github.com/users/romain-dartigues/orgs","repos_url":"https://api.github.com/users/romain-dartigues/repos","events_url":"https://api.github.com/users/romain-dartigues/events{/privacy}","received_events_url":"https://api.github.com/users/romain-dartigues/received_events","type":"User","site_admin":false},"repo":{"id":71884633,"name":"ansible-modules-extras","full_name":"romain-dartigues/ansible-modules-extras","owner":{"login":"romain-dartigues","id":393859,"avatar_url":"https://avatars.githubusercontent.com/u/393859?v=3","gravatar_id":"","url":"https://api.github.com/users/romain-dartigues","html_url":"https://github.com/romain-dartigues","followers_url":"https://api.github.com/users/romain-dartigues/followers","following_url":"https://api.github.com/users/romain-dartigues/following{/other_user}","gists_url":"https://api.github.com/users/romain-dartigues/gists{/gist_id}","starred_url":"https://api.github.com/users/romain-dartigues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romain-dartigues/subscriptions","organizations_url":"https://api.github.com/users/romain-dartigues/orgs","repos_url":"https://api.github.com/users/romain-dartigues/repos","events_url":"https://api.github.com/users/romain-dartigues/events{/privacy}","received_events_url":"https://api.github.com/users/romain-dartigues/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/romain-dartigues/ansible-modules-extras","description":"Ansible extra modules - these modules ship with ansible","fork":true,"url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras","forks_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/forks","keys_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/teams","hooks_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/hooks","issue_events_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/issues/events{/number}","events_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/events","assignees_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/assignees{/user}","branches_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/branches{/branch}","tags_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/tags","blobs_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/languages","stargazers_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/stargazers","contributors_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/contributors","subscribers_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/subscribers","subscription_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/subscription","commits_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/contents/{+path}","compare_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/merges","archive_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/downloads","issues_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/issues{/number}","pulls_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/labels{/name}","releases_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/releases{/id}","deployments_url":"https://api.github.com/repos/romain-dartigues/ansible-modules-extras/deployments","created_at":"2016-10-25T10:11:05Z","updated_at":"2016-10-25T10:11:12Z","pushed_at":"2016-10-28T08:10:09Z","git_url":"git://github.com/romain-dartigues/ansible-modules-extras.git","ssh_url":"git@github.com:romain-dartigues/ansible-modules-extras.git","clone_url":"https://github.com/romain-dartigues/ansible-modules-extras.git","svn_url":"https://github.com/romain-dartigues/ansible-modules-extras","homepage":"","size":8868,"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":"86d71bd97186e95ac00057a1bd976716ffdb1987","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-10-27T14:56:48Z","pushed_at":"2016-10-28T04:57:31Z","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":54761,"stargazers_count":757,"watchers_count":757,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1563,"mirror_url":null,"open_issues_count":681,"forks":1563,"open_issues":681,"watchers":757,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/3313"},"html":{"href":"https://github.com/ansible/ansible-modules-extras/pull/3313"},"issue":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/3313"},"comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/3313/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/3313/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/3313/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/c7ae6549eea745e4e197d3982e35f90d0d86904c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":93,"deletions":10,"changed_files":1}}
{"actor":{"display_login":"romain-dartigues"}}