mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 23:37:21 +00:00
66 lines
2.4 KiB
YAML
66 lines
2.4 KiB
YAML
---
|
|
- name: Add Guacamole group to remote desktop users
|
|
ansible.windows.win_group_membership:
|
|
name: Remote Desktop Users
|
|
members:
|
|
- "{{ win_project}}\\{{ guacamole_user_group }}"
|
|
state: present
|
|
tags: guacamole_rdu
|
|
|
|
- name: RD Gateway setup
|
|
tags: client_rdgw
|
|
block:
|
|
- name: Local policy for 'Remote Desktop Users' group to log on through Remote Desktop Services
|
|
ansible.windows.win_user_right:
|
|
name: SeRemoteInteractiveLogonRight
|
|
users:
|
|
- Remote Desktop Users
|
|
action: add
|
|
|
|
# https://exchangepedia.com/2016/10/enable-remote-desktop-rdp-connections-for-admins-on-windows-server-2016.html
|
|
- name: Registry edit - fDenyTSConnections
|
|
ansible.windows.win_dsc:
|
|
resource_name: Registry
|
|
Ensure: Present
|
|
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
|
|
ValueName: fDenyTSConnections
|
|
ValueData: 0
|
|
PsDscRunAsCredential_username: Administrator
|
|
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
|
|
|
- name: Registry edit - fSingleSessionPerUser
|
|
ansible.windows.win_dsc:
|
|
resource_name: Registry
|
|
Ensure: Present
|
|
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
|
|
ValueName: fSingleSessionPerUser
|
|
ValueData: 1
|
|
PsDscRunAsCredential_username: Administrator
|
|
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
|
|
|
- name: Registry edit - SecurityLayer
|
|
ansible.windows.win_dsc:
|
|
resource_name: Registry
|
|
Ensure: Present
|
|
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
|
|
ValueName: SecurityLayer
|
|
ValueData: 0
|
|
PsDscRunAsCredential_username: Administrator
|
|
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
|
|
|
- name: Registry edit - UserAuthentication
|
|
ansible.windows.win_dsc:
|
|
resource_name: Registry
|
|
Ensure: Present
|
|
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
|
|
ValueName: UserAuthentication
|
|
ValueData: 0
|
|
PsDscRunAsCredential_username: Administrator
|
|
PsDscRunAsCredential_password: "{{ ansible_password }}"
|
|
|
|
- name: Enable NetFireWallRule - “Remote Desktop”
|
|
tags: temp
|
|
ansible.windows.win_powershell:
|
|
script: |
|
|
Enable-NetFirewallRule -DisplayGroup “Remote Desktop”
|