win_product_facts: New module to get Windows product information (#35206)

* win_setup: Add Product ID and Product Key in facts

So this is actually a very nice way to get product key information from
systems collected centrally.

Especially with systems that have been upgraded from Windows 7 or
Windows 8 to Windows 10 may not have a valid Windows 10 product
license key printed anywhere, it was a digital license.

If you ever have to reinstall the system, you may recover the system
from the recovery partition, or the original media, but cannot upgrade
to Windows 10 for free. By collecting the product key, one can always
reinstall your free Windows upgrade.

My only question is, do we want this to be part of the default facts, as
it may be considered important information. Or should we make a special
**win_product_key_facts** ?

* Add ACPI product key support

* Add integration test

* Remove Get-ProductKey function, move inline
This commit is contained in:
Dag Wieers 2018-01-23 01:44:55 +01:00 committed by Jordan Borean
parent 4a1cc661c4
commit 2a4b3ef0c1
4 changed files with 115 additions and 0 deletions

View file

@ -0,0 +1 @@
windows/ci/group3

View file

@ -0,0 +1,11 @@
# This file is part of Ansible
# Copyright: (c) 2017, Dag Wieers (dagwieers) <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
- win_product_facts:
- assert:
that:
- ansible_os_product_id is defined
- ansible_os_product_key is defined