モチベーション
Windows の踏み台サーバとかで、複数セッション張りたいシチュエーションがありました。
ユーザー作成とかの流れで実行するといいかと。
環境
- local
- macOS 10.15.3
- ansible 2.9.6 (Python 3.7.5)
- remote
- GCE instance
- Windows Server 2016 Datacenter
やり方
レジストリを編集します。
multi-rdp-sessions/tasks/main.yml
- name: "Allow Multiple RDP Sessions"
win_regedit:
path: HKLM:\System\CurrentControlSet\Control\Terminal Server
name: fSingleSessionPerUser
data: 0
type: dword
state: present
参考
- マニュアルで実施するばあい
- 元々この方法ができないか検討していたんですが、今のところローカルグループポリシーを編集する ansible module はなさげ
- Remote Desktop Gateway server が設定されている場合はこれかな?