Debian Codegraph @

ansible_collections/community/windows/plugins/modules/win_rds_rap.py

raw
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3
4 # Copyright: (c) 2018, Kevin Subileau (@ksubileau)
5 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7 DOCUMENTATION = r'''
8 ---
9 module: win_rds_rap
10 short_description: Manage Resource Authorization Policies (RAP) on a Remote Desktop Gateway server
11 description:
12 - Creates, removes and configures a Remote Desktop resource authorization policy (RD RAP).
13 - A RD RAP allows you to specify the network resources (computers) that users can connect
14 to remotely through a Remote Desktop Gateway server.
15 author:
16 - Kevin Subileau (@ksubileau)
17 options:
18 name:
19 description:
20 - Name of the resource authorization policy.
21 required: yes
22 state:
23 description:
24 - The state of resource authorization policy.
25 - If C(absent) will ensure the policy is removed.
26 - If C(present) will ensure the policy is configured and exists.
27 - If C(enabled) will ensure the policy is configured, exists and enabled.
28 - If C(disabled) will ensure the policy is configured, exists, but disabled.
29 type: str
30 choices: [ absent, disabled, enabled, present ]
31 default: present
32 description:
33 description:
34 - Optional description of the resource authorization policy.
35 type: str
36 user_groups:
37 description:
38 - List of user groups that are associated with this resource authorization policy (RAP).
39 A user must belong to one of these groups to access the RD Gateway server.
40 - Required when a new RAP is created.
41 type: list
42 elements: str
43 allowed_ports:
44 description:
45 - List of port numbers through which connections are allowed for this policy.
46 - To allow connections through any port, specify 'any'.
47 type: list
48 elements: str
49 computer_group_type:
50 description:
51 - 'The computer group type:'
52 - 'C(rdg_group): RD Gateway-managed group'
53 - 'C(ad_network_resource_group): Active Directory Domain Services network resource group'
54 - 'C(allow_any): Allow users to connect to any network resource.'
55 type: str
56 choices: [ rdg_group, ad_network_resource_group, allow_any ]
57 computer_group:
58 description:
59 - The computer group name that is associated with this resource authorization policy (RAP).
60 - This is required when I(computer_group_type) is C(rdg_group) or C(ad_network_resource_group).
61 type: str
62 requirements:
63 - Windows Server 2008R2 (6.1) or higher.
64 - The Windows Feature "RDS-Gateway" must be enabled.
65 seealso:
66 - module: community.windows.win_rds_cap
67 - module: community.windows.win_rds_rap
68 - module: community.windows.win_rds_settings
69 '''
70
71 EXAMPLES = r'''
72 - name: Create a new RDS RAP
73 community.windows.win_rds_rap:
74 name: My RAP
75 description: Allow all users to connect to any resource through ports 3389 and 3390
76 user_groups:
77 - BUILTIN\users
78 computer_group_type: allow_any
79 allowed_ports:
80 - 3389
81 - 3390
82 state: enabled
83 '''
84
85 RETURN = r'''
86 '''