mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-27 11:29:09 -07:00
* Windows facts for ansible_winlicense_edition, ansible_winlicense_channel, ansible_winlicense_status added * bugfix, replaced = with : * changed facts to ansible_os_license_* in win_product_facts.ps1 Shortened the short_description in win_product_facts.py removed errant - options: {} from win_product_facts.py * Code optimisations and changed return code to $null from NA when unknown license information returned from CIM SoftwareLicensingProduct class. * code optimisation
38 lines
1 KiB
Python
38 lines
1 KiB
Python
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# 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)
|
|
|
|
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|
'status': ['preview'],
|
|
'supported_by': 'community'}
|
|
|
|
DOCUMENTATION = r'''
|
|
---
|
|
module: win_product_facts
|
|
short_description: Provides Windows product and license information
|
|
description:
|
|
- Provides Windows product information.
|
|
version_added: '2.5'
|
|
author:
|
|
- Dag Wieers (@dagwieers)
|
|
'''
|
|
|
|
EXAMPLES = r'''
|
|
- name: Get product id and product key
|
|
win_product_facts:
|
|
'''
|
|
|
|
RETURN = r'''
|
|
ansible_facts:
|
|
description: returned facts by this module
|
|
returned: always
|
|
type: dict
|
|
sample:
|
|
ansible_os_product_id: 00326-10000-00000-AA698
|
|
ansible_os_product_key: T49TD-6VFBW-VV7HY-B2PXY-MY47H
|
|
ansible_os_license_edition: Windows(R) ServerStandard edition
|
|
ansible_os_license_channel: Volume:MAK
|
|
ansible_os_license_status: Licensed
|
|
'''
|