mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
2.1 KiB
57 lines
2.1 KiB
2 years ago
|
---
|
||
|
- hosts: windows
|
||
|
vars:
|
||
|
- DownloadHost: https://demo.jumpserver.org/download
|
||
|
- RDS_Licensing: enabled
|
||
|
- RDS_LicenseServer: 127.0.0.1
|
||
|
- RDS_LicensingMode: 4
|
||
|
- RDS_fSingleSessionPerUser: 0
|
||
|
- RDS_MaxDisconnectionTime: 60000
|
||
|
- RDS_RemoteAppLogoffTimeLimit: 0
|
||
|
tasks:
|
||
|
- name: Install RDS-Licensing (RDS)
|
||
|
ansible.windows.win_feature:
|
||
|
name: RDS-Licensing
|
||
|
state: present
|
||
|
include_management_tools: yes
|
||
|
when: RDS_Licensing == "enabled"
|
||
|
- name: Install RDS-RD-Server (RDS)
|
||
|
ansible.windows.win_feature:
|
||
|
name: RDS-RD-Server
|
||
|
state: present
|
||
|
include_management_tools: yes
|
||
|
register: win_feature
|
||
|
- name: Reboot if installing RDS feature requires it
|
||
|
ansible.windows.win_reboot:
|
||
|
when: win_feature.reboot_required
|
||
|
- name: Set RDS LicenseServer (regedit)
|
||
|
ansible.windows.win_regedit:
|
||
|
path: HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
|
||
|
name: LicenseServers
|
||
|
data: "{{ RDS_LicenseServer }}"
|
||
|
type: string
|
||
|
- name: Set RDS LicensingMode (regedit)
|
||
|
ansible.windows.win_regedit:
|
||
|
path: HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
|
||
|
name: LicensingMode
|
||
|
data: "{{ RDS_LicensingMode }}"
|
||
|
type: dword
|
||
|
- name: Set RDS fSingleSessionPerUser (regedit)
|
||
|
ansible.windows.win_regedit:
|
||
|
path: HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
|
||
|
name: fSingleSessionPerUser
|
||
|
data: "{{ RDS_fSingleSessionPerUser }}"
|
||
|
type: dword
|
||
|
- name: Set RDS MaxDisconnectionTime (regedit)
|
||
|
ansible.windows.win_regedit:
|
||
|
path: HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
|
||
|
name: MaxDisconnectionTime
|
||
|
data: "{{ RDS_MaxDisconnectionTime }}"
|
||
|
type: dword
|
||
|
when: RDS_MaxDisconnectionTime >= 60000
|
||
|
- name: Set RDS RemoteAppLogoffTimeLimit (regedit)
|
||
|
ansible.windows.win_regedit:
|
||
|
path: HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
|
||
|
name: RemoteAppLogoffTimeLimit
|
||
|
data: "{{ RDS_RemoteAppLogoffTime }}"
|