1#!/usr/local/bin/python3.8 2# -*- coding: utf-8 -*- 3 4# Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com> 5# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 6 7DOCUMENTATION = r''' 8--- 9module: win_product_facts 10short_description: Provides Windows product and license information 11description: 12- Provides Windows product and license information. 13author: 14- Dag Wieers (@dagwieers) 15''' 16 17EXAMPLES = r''' 18- name: Get product id and product key 19 community.windows.win_product_facts: 20 21- name: Display Windows edition 22 debug: 23 var: ansible_os_license_edition 24 25- name: Display Windows license status 26 debug: 27 var: ansible_os_license_status 28''' 29 30RETURN = r''' 31ansible_facts: 32 description: Dictionary containing all the detailed information about the Windows product and license. 33 returned: always 34 type: complex 35 contains: 36 ansible_os_license_channel: 37 description: The Windows license channel. 38 returned: always 39 type: str 40 sample: Volume:MAK 41 ansible_os_license_edition: 42 description: The Windows license edition. 43 returned: always 44 type: str 45 sample: Windows(R) ServerStandard edition 46 ansible_os_license_status: 47 description: The Windows license status. 48 returned: always 49 type: str 50 sample: Licensed 51 ansible_os_product_id: 52 description: The Windows product ID. 53 returned: always 54 type: str 55 sample: 00326-10000-00000-AA698 56 ansible_os_product_key: 57 description: The Windows product key. 58 returned: always 59 type: str 60 sample: T49TD-6VFBW-VV7HY-B2PXY-MY47H 61''' 62