community.general/lib/ansible/modules/windows/win_rds_settings.py

56 lines
1.7 KiB
Python
Raw Normal View History

Add modules to manage Remote Desktop Services (#43406) * Add windows module win_rds_settings * Add windows module win_rds_rap * Add windows module win_rds_cap * Add tests for module win_rds_settings * Add tests for module win_rds_rap * Add tests for module win_rds_cap * Validate user and computer groups in module win_rds_cap * Validate user groups in module win_rds_rap * Support additional formats (UPN, Down-Level Login Name, SID and Login Name) for user and computer group names in module win_rds_cap * Support additional formats (UPN, Down-Level Login Name, SID and Login Name) for user group names in module win_rds_rap * Validate computer group parameter and support additional formats (UPN, Down-Level Login Name, SID and Login Name) in module win_rds_rap * Validate allowed ports parameter in module win_rds_rap * Ensure user group list is not empty in module win_rds_rap * Remove unwanted value in result object * Ensure user group list is not empty in module win_rds_cap * Ensure order parameter value never exceed the number of existing CAPs in module win_rds_cap * Add diff mode support to win_rds_cap * Add diff mode support to win_rds_rap * Add diff mode support to win_rds_settings * Add SSL bridging and messaging policy settings to module win_rds_settings * Fix copyright [skip ci] * Add missing trailing dots in documentation [skip ci] * Fix incorrect variable passed to Fail-Json * Minor changes and doc update * Avoid using Powershell aliases * Use WMI instead of PSProvider to handle group names to avoid conversion in UPN form * Use CIM instead of WMI cmdlets
2019-01-29 21:21:56 +00:00
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Kevin Subileau (@ksubileau)
# 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_rds_settings
short_description: Manage main settings of a Remote Desktop Gateway server
description:
- Configure general settings of a Remote Desktop Gateway server.
version_added: "2.8"
author:
- Kevin Subileau (@ksubileau)
options:
certificate_hash:
description:
- Certificate hash (thumbprint) for the Remote Desktop Gateway server. The certificate hash is the unique identifier for the certificate.
max_connections:
description:
- The maximum number of connections allowed.
- If set to C(0), no new connections are allowed.
- If set to C(-1), the number of connections is unlimited.
ssl_bridging:
description:
- Specifies whether to use SSL Bridging.
- 'C(none): no SSL bridging.'
- 'C(https_http): HTTPS-HTTP bridging.'
- 'C(https_https): HTTPS-HTTPS bridging.'
choices: [ none, https_http, https_https ]
enable_only_messaging_capable_clients:
description:
- If enabled, only clients that support logon messages and administrator messages can connect.
type: bool
requirements:
- Windows Server 2008R2 (6.1) or higher.
- The Windows Feature "RDS-Gateway" must be enabled.
'''
EXAMPLES = r'''
- name: Configure the Remote Desktop Gateway
win_rds_settings:
certificate_hash: B0D0FA8408FC67B230338FCA584D03792DA73F4C
max_connections: 50
notify:
- Restart TSGateway service
'''
RETURN = r'''
'''