-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathtigervnc.yml
80 lines (72 loc) · 2.86 KB
/
tigervnc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
- hosts: computers
tasks:
- name: Test system connection
wait_for_connection:
timeout: 20
- name: Ensure we are on a private network
win_shell: |
Set-NetConnectionProfile -NetworkCategory Private -InterfaceAlias "LAN-Verbinding" -ErrorAction SilentlyContinue
Set-NetConnectionProfile -NetworkCategory Private -InterfaceAlias "Local Area Connection" -ErrorAction SilentlyContinue
Set-NetConnectionProfile -NetworkCategory Private -InterfaceAlias "Ethernet" -ErrorAction SilentlyContinue
Set-NetConnectionProfile -NetwerkCategory Private -InterfaceAlias "Draadloze netwerkverbinding" -ErrorAction SilentlyContinu
Set-NetConnectionProfile -NetworkCategory Private -InterfaceAlias "Wi-Fi" -ErrorAction SilentlyContinue
ignore_errors: yes
tags: private
# - name: Download VNC Connect
# win_get_url:
# url: https://www.realvnc.com/download/file/vnc.files/VNC-Server-6.2.0-Windows.exe
# dest: '%USERPROFILE%\Downloads\VNC-Server-6.2.0-Windows.exe'
#
# - name: Install VNC Connect
# win_package:
# path: '%USERPROFILE%\Downloads\tigervnc64-1.8.0.exe'
# arguments: /qn REBOOT=ReallySuppress ENABLEAUTOUPDATECHECKS=1 ENABLEANALYTICS=1
# - name: Install VNC Connect
# win_package:
# product_id: '{9236C00E-10E1-46C2-829B-8FA8D5F97EE3}'
# path: '%USERPROFILE%\Downloads\VNC-Server-6.2.0-Windows.exe'
# arguments: /qn REBOOT=ReallySuppress ENABLEAUTOUPDATECHECKS=1 ENABLEANALYTICS=1
# - name: Install VNC Connect
# win_psexec:
# command: 'C:\Users\ictadmin\Downloads\VNC-Server-6.2.0-Windows.exe /qn REBOOT=ReallySuppress ENABLEAUTOUPDATECHECKS=1 ENABLEANALYTICS=1'
# elevated: yes
- name: Install TigerVNC
win_chocolatey:
name: tigervnc
# version: '1.8.0'
state: latest
- name: Configure TigerVNC
win_regedit:
path: HKLM:\SOFTWARE\TigerVNC\WinVNC4
name: '{{ item.name }}'
data: '{{ item.data }}'
type: '{{ item.type|default("dword") }}'
with_items:
- { name: AlwaysShared, data: 1 }
- { name: DisableEffects, data: 1 }
- { name: HTTPPortNumber, data: 0 }
- { name: NeverShared, data: 0 }
- { name: Password, data: '{{ vnc_password }}', type: binary }
- { name: QueryConnect, data: 0 }
- { name: QueryOnlyIfLoggedOn, data: 0 }
- { name: RemoveWallpaper, data: 0 }
- { name: SecurityTypes, data: 'VeNCrypt,TLSVnc', type: string }
tags: registry
- name: Configure TigerVNC firewall rule
win_firewall_rule:
name: VNC Server
localport: 5900
action: allow
direction: in
protocol: TCP
profile: private
enable: yes
tags: firewall
- name: Ensure TigerVNC is running
win_service:
name: TigerVNC
startmode: auto
state: restarted
force: yes
force_dependent_services: yes
tags: service