{"action":"created","comment":{"url":"https://api.github.com/repos/ansible/ansible/pulls/comments/243925744","pull_request_review_id":187808555,"id":243925744,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzkyNTc0NA==","diff_hunk":"@@ -292,12 +297,16 @@ def ufw_version():\n \n     # Ensure ufw is available\n     ufw_bin = module.get_bin_path('ufw', True)\n+    grep_bin = module.get_bin_path('grep', True)\n \n     # Save the pre state and rules in order to recognize changes\n-    (_, pre_state, _) = module.run_command(ufw_bin + ' status verbose')\n-    (_, pre_rules, _) = module.run_command(\"grep '^### tuple' /lib/ufw/user.rules /lib/ufw/user6.rules /etc/ufw/user.rules /etc/ufw/user6.rules\")\n+    (_, pre_state, _) = execute([[ufw_bin], ['status'], ['verbose']])\n+    (_, pre_rules, _) = get_current_rules()","path":"lib/ansible/modules/system/ufw.py","position":28,"original_position":29,"commit_id":"36eef4d72ed9f6acdef4d505b6e1feccde7b1e25","original_commit_id":"36eef4d72ed9f6acdef4d505b6e1feccde7b1e25","user":{"login":"felixfontein","id":5781356,"node_id":"MDQ6VXNlcjU3ODEzNTY=","avatar_url":"https://avatars0.githubusercontent.com/u/5781356?v=4","gravatar_id":"","url":"https://api.github.com/users/felixfontein","html_url":"https://github.com/felixfontein","followers_url":"https://api.github.com/users/felixfontein/followers","following_url":"https://api.github.com/users/felixfontein/following{/other_user}","gists_url":"https://api.github.com/users/felixfontein/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfontein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfontein/subscriptions","organizations_url":"https://api.github.com/users/felixfontein/orgs","repos_url":"https://api.github.com/users/felixfontein/repos","events_url":"https://api.github.com/users/felixfontein/events{/privacy}","received_events_url":"https://api.github.com/users/felixfontein/received_events","type":"User","site_admin":false},"body":"Why not return just the middle part of the tuple (instead of the full tuple)?","created_at":"2018-12-25T22:24:39Z","updated_at":"2018-12-25T22:36:57Z","html_url":"https://github.com/ansible/ansible/pull/49948#discussion_r243925744","pull_request_url":"https://api.github.com/repos/ansible/ansible/pulls/49948","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments/243925744"},"html":{"href":"https://github.com/ansible/ansible/pull/49948#discussion_r243925744"},"pull_request":{"href":"https://api.github.com/repos/ansible/ansible/pulls/49948"}}},"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/49948","id":238744223,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4NzQ0MjIz","html_url":"https://github.com/ansible/ansible/pull/49948","diff_url":"https://github.com/ansible/ansible/pull/49948.diff","patch_url":"https://github.com/ansible/ansible/pull/49948.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/49948","number":49948,"state":"open","locked":false,"title":"Enable changed var with ufw check mode","user":{"login":"jbarotin","id":4245508,"node_id":"MDQ6VXNlcjQyNDU1MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/4245508?v=4","gravatar_id":"","url":"https://api.github.com/users/jbarotin","html_url":"https://github.com/jbarotin","followers_url":"https://api.github.com/users/jbarotin/followers","following_url":"https://api.github.com/users/jbarotin/following{/other_user}","gists_url":"https://api.github.com/users/jbarotin/gists{/gist_id}","starred_url":"https://api.github.com/users/jbarotin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbarotin/subscriptions","organizations_url":"https://api.github.com/users/jbarotin/orgs","repos_url":"https://api.github.com/users/jbarotin/repos","events_url":"https://api.github.com/users/jbarotin/events{/privacy}","received_events_url":"https://api.github.com/users/jbarotin/received_events","type":"User","site_admin":false},"body":"##### SUMMARY\r\n<!--- Describe the change below, including rationale and design decisions -->\r\nThis is a proposal in order to have boolean \"changed\" value while activate the check mode of the ufw module. \r\nFixes #45604 \r\n\r\n<!--- HINT: Include \"Fixes #nnn\" if you are fixing an existing issue -->\r\n\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest -->\r\n- Feature Pull Request\r\n\r\n##### COMPONENT NAME\r\nufw \r\n\r\n##### ADDITIONAL INFORMATION\r\n<!--- Include additional information to help people understand the change here -->\r\n<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->\r\n\r\n<!--- Paste verbatim command output below, e.g. before and after your change -->\r\n```paste below\r\n\r\n```\r\n","created_at":"2018-12-14T14:48:23Z","updated_at":"2018-12-25T22:36:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec3349237257cfb2a5b06e4a0183e9dc8daf4845","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1043397454,"node_id":"MDU6TGFiZWwxMDQzMzk3NDU0","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.8","name":"affects_2.8","color":"ededed","default":false},{"id":513652538,"node_id":"MDU6TGFiZWw1MTM2NTI1Mzg=","url":"https://api.github.com/repos/ansible/ansible/labels/core_review","name":"core_review","color":"ededed","default":false},{"id":852590921,"node_id":"MDU6TGFiZWw4NTI1OTA5MjE=","url":"https://api.github.com/repos/ansible/ansible/labels/feature","name":"feature","color":"006b75","default":false},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":723150340,"node_id":"MDU6TGFiZWw3MjMxNTAzNDA=","url":"https://api.github.com/repos/ansible/ansible/labels/new_contributor","name":"new_contributor","color":"c2e0c6","default":false},{"id":636327968,"node_id":"MDU6TGFiZWw2MzYzMjc5Njg=","url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","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}],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/49948/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/49948/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/49948/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/36eef4d72ed9f6acdef4d505b6e1feccde7b1e25","head":{"label":"jbarotin:check_mode_ufw","ref":"check_mode_ufw","sha":"36eef4d72ed9f6acdef4d505b6e1feccde7b1e25","user":{"login":"jbarotin","id":4245508,"node_id":"MDQ6VXNlcjQyNDU1MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/4245508?v=4","gravatar_id":"","url":"https://api.github.com/users/jbarotin","html_url":"https://github.com/jbarotin","followers_url":"https://api.github.com/users/jbarotin/followers","following_url":"https://api.github.com/users/jbarotin/following{/other_user}","gists_url":"https://api.github.com/users/jbarotin/gists{/gist_id}","starred_url":"https://api.github.com/users/jbarotin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbarotin/subscriptions","organizations_url":"https://api.github.com/users/jbarotin/orgs","repos_url":"https://api.github.com/users/jbarotin/repos","events_url":"https://api.github.com/users/jbarotin/events{/privacy}","received_events_url":"https://api.github.com/users/jbarotin/received_events","type":"User","site_admin":false},"repo":{"id":161795575,"node_id":"MDEwOlJlcG9zaXRvcnkxNjE3OTU1NzU=","name":"ansible","full_name":"jbarotin/ansible","private":false,"owner":{"login":"jbarotin","id":4245508,"node_id":"MDQ6VXNlcjQyNDU1MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/4245508?v=4","gravatar_id":"","url":"https://api.github.com/users/jbarotin","html_url":"https://github.com/jbarotin","followers_url":"https://api.github.com/users/jbarotin/followers","following_url":"https://api.github.com/users/jbarotin/following{/other_user}","gists_url":"https://api.github.com/users/jbarotin/gists{/gist_id}","starred_url":"https://api.github.com/users/jbarotin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbarotin/subscriptions","organizations_url":"https://api.github.com/users/jbarotin/orgs","repos_url":"https://api.github.com/users/jbarotin/repos","events_url":"https://api.github.com/users/jbarotin/events{/privacy}","received_events_url":"https://api.github.com/users/jbarotin/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jbarotin/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications — automate in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com/ansible/","fork":true,"url":"https://api.github.com/repos/jbarotin/ansible","forks_url":"https://api.github.com/repos/jbarotin/ansible/forks","keys_url":"https://api.github.com/repos/jbarotin/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbarotin/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbarotin/ansible/teams","hooks_url":"https://api.github.com/repos/jbarotin/ansible/hooks","issue_events_url":"https://api.github.com/repos/jbarotin/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/jbarotin/ansible/events","assignees_url":"https://api.github.com/repos/jbarotin/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/jbarotin/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/jbarotin/ansible/tags","blobs_url":"https://api.github.com/repos/jbarotin/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbarotin/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbarotin/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbarotin/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbarotin/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/jbarotin/ansible/languages","stargazers_url":"https://api.github.com/repos/jbarotin/ansible/stargazers","contributors_url":"https://api.github.com/repos/jbarotin/ansible/contributors","subscribers_url":"https://api.github.com/repos/jbarotin/ansible/subscribers","subscription_url":"https://api.github.com/repos/jbarotin/ansible/subscription","commits_url":"https://api.github.com/repos/jbarotin/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbarotin/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbarotin/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbarotin/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbarotin/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/jbarotin/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbarotin/ansible/merges","archive_url":"https://api.github.com/repos/jbarotin/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbarotin/ansible/downloads","issues_url":"https://api.github.com/repos/jbarotin/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/jbarotin/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/jbarotin/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/jbarotin/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbarotin/ansible/labels{/name}","releases_url":"https://api.github.com/repos/jbarotin/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/jbarotin/ansible/deployments","created_at":"2018-12-14T14:31:46Z","updated_at":"2018-12-14T14:32:21Z","pushed_at":"2018-12-24T13:06:27Z","git_url":"git://github.com/jbarotin/ansible.git","ssh_url":"git@github.com:jbarotin/ansible.git","clone_url":"https://github.com/jbarotin/ansible.git","svn_url":"https://github.com/jbarotin/ansible","homepage":"https://www.ansible.com/","size":140046,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"3517373cfda6b68f5237d454631ec6bbbd2870a5","user":{"login":"ansible","id":1507452,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDc0NTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1507452?v=4","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":3638964,"node_id":"MDEwOlJlcG9zaXRvcnkzNjM4OTY0","name":"ansible","full_name":"ansible/ansible","private":false,"owner":{"login":"ansible","id":1507452,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDc0NTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1507452?v=4","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},"html_url":"https://github.com/ansible/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications — automate in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com/ansible/","fork":false,"url":"https://api.github.com/repos/ansible/ansible","forks_url":"https://api.github.com/repos/ansible/ansible/forks","keys_url":"https://api.github.com/repos/ansible/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible/teams","hooks_url":"https://api.github.com/repos/ansible/ansible/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible/events","assignees_url":"https://api.github.com/repos/ansible/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible/tags","blobs_url":"https://api.github.com/repos/ansible/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible/subscription","commits_url":"https://api.github.com/repos/ansible/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible/merges","archive_url":"https://api.github.com/repos/ansible/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible/downloads","issues_url":"https://api.github.com/repos/ansible/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible/deployments","created_at":"2012-03-06T14:58:02Z","updated_at":"2018-12-25T21:46:09Z","pushed_at":"2018-12-25T22:35:23Z","git_url":"git://github.com/ansible/ansible.git","ssh_url":"git@github.com:ansible/ansible.git","clone_url":"https://github.com/ansible/ansible.git","svn_url":"https://github.com/ansible/ansible","homepage":"https://www.ansible.com/","size":148936,"stargazers_count":34469,"watchers_count":34469,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13841,"mirror_url":null,"archived":false,"open_issues_count":5539,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":13841,"open_issues":5539,"watchers":34469,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/49948"},"html":{"href":"https://github.com/ansible/ansible/pull/49948"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/49948"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/49948/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/49948/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/49948/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/36eef4d72ed9f6acdef4d505b6e1feccde7b1e25"}},"author_association":"NONE"}}
{"actor":{"display_login":"felixfontein"}}