community.windows.win_rds_rap 模块 – 管理远程桌面网关服务器上的资源授权策略 (RAP)
注意
此模块是 community.windows 集合(版本 2.3.0)的一部分。
如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install community.windows。您需要进一步的要求才能使用此模块,请参阅要求了解详细信息。
要在 playbook 中使用它,请指定:community.windows.win_rds_rap。
概要
- 创建、删除和配置远程桌面资源授权策略 (RD RAP)。 
- RD RAP 允许您指定用户可以通过远程桌面网关服务器远程连接的网络资源(计算机)。 
要求
在执行此模块的主机上需要以下要求。
- Windows Server 2008R2 (6.1) 或更高版本。 
- 必须启用 Windows 功能“RDS-网关”。 
参数
| 参数 | 注释 | 
|---|---|
| 允许此策略连接的端口号列表。 要允许通过任何端口连接,请指定“any”。 | |
| 与此资源授权策略 (RAP) 关联的计算机组名称。 当 computer_group_type 为  | |
| 计算机组类型 
 
 
 选择 
 | |
| 资源授权策略的可选描述。 | |
| 资源授权策略的名称。 | |
| 资源授权策略的状态。 如果  如果  如果  如果  选择 
 | |
| 与此资源授权策略 (RAP) 关联的用户组列表。用户必须属于这些组之一才能访问 RD 网关服务器。 创建新 RAP 时是必需的。 | 
另请参阅
另请参阅
- community.windows.win_rds_cap
- 管理远程桌面网关服务器上的连接授权策略 (CAP)。 
- community.windows.win_rds_rap
- 管理远程桌面网关服务器上的资源授权策略 (RAP)。 
- community.windows.win_rds_settings
- 管理远程桌面网关服务器的主要设置。 
示例
- name: Create a new RDS RAP
  community.windows.win_rds_rap:
    name: My RAP
    description: Allow all users to connect to any resource through ports 3389 and 3390
    user_groups:
      - BUILTIN\users
    computer_group_type: allow_any
    allowed_ports:
      - 3389
      - 3390
    state: enabled
作者
- Kevin Subileau (@ksubileau) 
