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 2008 R2 (6.1) 或更高版本。 
- 必须启用 Windows 功能“RDS-Gateway”。 
参数
| 参数 | 注释 | 
|---|---|
| 此策略允许连接的端口号列表。 要允许通过任何端口连接,请指定“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) 
