{"action":"created","comment":{"url":"https://api.github.com/repos/ansible/ansible/pulls/comments/242828358","pull_request_review_id":186433004,"id":242828358,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjgyODM1OA==","diff_hunk":"@@ -57,9 +57,41 @@ if (-not $product_key) {\n     }\n }\n \n+# Retrieve license information\n+$license_info = Get-CimInstance SoftwareLicensingProduct | Where-Object PartialProductKey\n+\n+$winlicense_status = switch ($license_info.LicenseStatus) {\n+    0 { \"Unlicensed\" }\n+    1 { \"Licensed\" }\n+    2 { \"OOBGrace\" }\n+    3 { \"OOTGrace\" }\n+    4 { \"NonGenuineGrace\" }\n+    5 { \"Notification\" }\n+    6 { \"ExtendedGrace\" }\n+    default { $null }\n+}\n+\n+if ($license_info.Name) {\n+    $winlicense_edition = $license_info.Name\n+}\n+else {\n+    $winlicense_edition = $null\n+}\n+\n+if ($license_info.ProductKeyChannel) {","path":"lib/ansible/modules/windows/win_product_facts.ps1","position":25,"original_position":25,"commit_id":"d515ce61440d0d033332da517a5777066d1d8510","original_commit_id":"d515ce61440d0d033332da517a5777066d1d8510","user":{"login":"dagwieers","id":388198,"node_id":"MDQ6VXNlcjM4ODE5OA==","avatar_url":"https://avatars0.githubusercontent.com/u/388198?v=4","gravatar_id":"","url":"https://api.github.com/users/dagwieers","html_url":"https://github.com/dagwieers","followers_url":"https://api.github.com/users/dagwieers/followers","following_url":"https://api.github.com/users/dagwieers/following{/other_user}","gists_url":"https://api.github.com/users/dagwieers/gists{/gist_id}","starred_url":"https://api.github.com/users/dagwieers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dagwieers/subscriptions","organizations_url":"https://api.github.com/users/dagwieers/orgs","repos_url":"https://api.github.com/users/dagwieers/repos","events_url":"https://api.github.com/users/dagwieers/events{/privacy}","received_events_url":"https://api.github.com/users/dagwieers/received_events","type":"User","site_admin":false},"body":"Can we not just do?\r\n```powershell\r\n$winlicense_channel = $license_info.ProductKeyChannel\r\n```","created_at":"2018-12-19T08:36:25Z","updated_at":"2018-12-19T08:36:25Z","html_url":"https://github.com/ansible/ansible/pull/50079#discussion_r242828358","pull_request_url":"https://api.github.com/repos/ansible/ansible/pulls/50079","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments/242828358"},"html":{"href":"https://github.com/ansible/ansible/pull/50079#discussion_r242828358"},"pull_request":{"href":"https://api.github.com/repos/ansible/ansible/pulls/50079"}}},"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/50079","id":239449705,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5NDQ5NzA1","html_url":"https://github.com/ansible/ansible/pull/50079","diff_url":"https://github.com/ansible/ansible/pull/50079.diff","patch_url":"https://github.com/ansible/ansible/pull/50079.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/50079","number":50079,"state":"open","locked":false,"title":"Windows facts for licensing information","user":{"login":"rhydian76","id":26249168,"node_id":"MDQ6VXNlcjI2MjQ5MTY4","avatar_url":"https://avatars2.githubusercontent.com/u/26249168?v=4","gravatar_id":"","url":"https://api.github.com/users/rhydian76","html_url":"https://github.com/rhydian76","followers_url":"https://api.github.com/users/rhydian76/followers","following_url":"https://api.github.com/users/rhydian76/following{/other_user}","gists_url":"https://api.github.com/users/rhydian76/gists{/gist_id}","starred_url":"https://api.github.com/users/rhydian76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhydian76/subscriptions","organizations_url":"https://api.github.com/users/rhydian76/orgs","repos_url":"https://api.github.com/users/rhydian76/repos","events_url":"https://api.github.com/users/rhydian76/events{/privacy}","received_events_url":"https://api.github.com/users/rhydian76/received_events","type":"User","site_admin":false},"body":"Windows facts for licensing information added\r\n\r\n##### SUMMARY\r\nNo available facts for windows licensing information - for things like activation status, license channel, and license edition.\r\n\r\n##### ISSUE TYPE\r\n\r\n- Feature Pull Request\r\n\r\n\r\n##### COMPONENT NAME\r\n\r\n/lib/ansible/modules/windows/win_product_facts.ps1\r\n/lib/ansible/modules/windows/win_product_facts.py\r\n\r\n##### ADDITIONAL INFORMATION\r\n\r\nThe win_product_facts module now adds facts for ansible_os_license_edition, ansible_os_license_channel and ansible_os_license_status\r\n","created_at":"2018-12-18T11:11:58Z","updated_at":"2018-12-19T08:36:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16e8791529ee90b18982318e596863dbe461b748","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":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":61436281,"node_id":"MDU6TGFiZWw2MTQzNjI4MQ==","url":"https://api.github.com/repos/ansible/ansible/labels/needs_revision","name":"needs_revision","color":"eb6450","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":108461331,"node_id":"MDU6TGFiZWwxMDg0NjEzMzE=","url":"https://api.github.com/repos/ansible/ansible/labels/windows","name":"windows","color":"777777","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/50079/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/50079/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/50079/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/d515ce61440d0d033332da517a5777066d1d8510","head":{"label":"rhydian76:devel","ref":"devel","sha":"d515ce61440d0d033332da517a5777066d1d8510","user":{"login":"rhydian76","id":26249168,"node_id":"MDQ6VXNlcjI2MjQ5MTY4","avatar_url":"https://avatars2.githubusercontent.com/u/26249168?v=4","gravatar_id":"","url":"https://api.github.com/users/rhydian76","html_url":"https://github.com/rhydian76","followers_url":"https://api.github.com/users/rhydian76/followers","following_url":"https://api.github.com/users/rhydian76/following{/other_user}","gists_url":"https://api.github.com/users/rhydian76/gists{/gist_id}","starred_url":"https://api.github.com/users/rhydian76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhydian76/subscriptions","organizations_url":"https://api.github.com/users/rhydian76/orgs","repos_url":"https://api.github.com/users/rhydian76/repos","events_url":"https://api.github.com/users/rhydian76/events{/privacy}","received_events_url":"https://api.github.com/users/rhydian76/received_events","type":"User","site_admin":false},"repo":{"id":162273661,"node_id":"MDEwOlJlcG9zaXRvcnkxNjIyNzM2NjE=","name":"ansible","full_name":"rhydian76/ansible","private":false,"owner":{"login":"rhydian76","id":26249168,"node_id":"MDQ6VXNlcjI2MjQ5MTY4","avatar_url":"https://avatars2.githubusercontent.com/u/26249168?v=4","gravatar_id":"","url":"https://api.github.com/users/rhydian76","html_url":"https://github.com/rhydian76","followers_url":"https://api.github.com/users/rhydian76/followers","following_url":"https://api.github.com/users/rhydian76/following{/other_user}","gists_url":"https://api.github.com/users/rhydian76/gists{/gist_id}","starred_url":"https://api.github.com/users/rhydian76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhydian76/subscriptions","organizations_url":"https://api.github.com/users/rhydian76/orgs","repos_url":"https://api.github.com/users/rhydian76/repos","events_url":"https://api.github.com/users/rhydian76/events{/privacy}","received_events_url":"https://api.github.com/users/rhydian76/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rhydian76/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/rhydian76/ansible","forks_url":"https://api.github.com/repos/rhydian76/ansible/forks","keys_url":"https://api.github.com/repos/rhydian76/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhydian76/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhydian76/ansible/teams","hooks_url":"https://api.github.com/repos/rhydian76/ansible/hooks","issue_events_url":"https://api.github.com/repos/rhydian76/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/rhydian76/ansible/events","assignees_url":"https://api.github.com/repos/rhydian76/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/rhydian76/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/rhydian76/ansible/tags","blobs_url":"https://api.github.com/repos/rhydian76/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhydian76/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhydian76/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhydian76/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhydian76/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/rhydian76/ansible/languages","stargazers_url":"https://api.github.com/repos/rhydian76/ansible/stargazers","contributors_url":"https://api.github.com/repos/rhydian76/ansible/contributors","subscribers_url":"https://api.github.com/repos/rhydian76/ansible/subscribers","subscription_url":"https://api.github.com/repos/rhydian76/ansible/subscription","commits_url":"https://api.github.com/repos/rhydian76/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhydian76/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhydian76/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhydian76/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhydian76/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/rhydian76/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhydian76/ansible/merges","archive_url":"https://api.github.com/repos/rhydian76/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhydian76/ansible/downloads","issues_url":"https://api.github.com/repos/rhydian76/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/rhydian76/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/rhydian76/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/rhydian76/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhydian76/ansible/labels{/name}","releases_url":"https://api.github.com/repos/rhydian76/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/rhydian76/ansible/deployments","created_at":"2018-12-18T10:51:41Z","updated_at":"2018-12-19T07:56:02Z","pushed_at":"2018-12-19T07:55:58Z","git_url":"git://github.com/rhydian76/ansible.git","ssh_url":"git@github.com:rhydian76/ansible.git","clone_url":"https://github.com/rhydian76/ansible.git","svn_url":"https://github.com/rhydian76/ansible","homepage":"https://www.ansible.com/","size":140405,"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":"e65b72128393dce01c221b9c11385385efc5f85d","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-19T08:35:41Z","pushed_at":"2018-12-19T08:35:37Z","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":148688,"stargazers_count":34353,"watchers_count":34353,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13793,"mirror_url":null,"archived":false,"open_issues_count":5529,"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":13793,"open_issues":5529,"watchers":34353,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/50079"},"html":{"href":"https://github.com/ansible/ansible/pull/50079"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/50079"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/50079/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/50079/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/50079/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/d515ce61440d0d033332da517a5777066d1d8510"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dagwieers"}}