# https://github.com/cedrozor/myrtille
|
|
- name: Install IIS and .Net 4.5 on Server
|
win_feature:
|
name:
|
- Web-Server
|
- NET-Framework-Core
|
# - Application-Server
|
- Web-Asp-Net45
|
include_management_tools: True
|
state: present
|
when: "'Windows 10' not in ansible_distribution"
|
|
- name: Install IIS and .Net 4.5 on Non-Server
|
win_dsc:
|
resource_name: WindowsOptionalFeature
|
Name: "{{ item }}"
|
Ensure: Enable
|
when: "'Windows 10' in ansible_distribution"
|
loop:
|
- IIS-WebServerRole
|
- IIS-WebServer
|
- NetFx4Extended-ASPNET45
|
- IIS-NetFxExtensibility45
|
- IIS-ISAPIExtensions
|
- IIS-ISAPIFilter
|
- IIS-ASPNET45
|
|
- name: Create temp directory
|
win_file:
|
path: C:\Temp\
|
state: directory
|
|
- name: Check if Myrtille is downloaded
|
win_stat:
|
path: C:\Temp\Myrtille_2.3.1_x86_x64_Setup.exe
|
register: myrtille
|
|
# The following fails because windows defaults to TLS 1.0 and Github now requires 1.2
|
# - name: Download Myrtille to specified path only if modified
|
# win_get_url:
|
# url: https://github.com/cedrozor/myrtille/releases/download/v2.3.1/Myrtille_2.3.1_x86_x64_Setup.exe
|
# dest: C:\Temp\Myrtille_2.3.1_x86_x64_Setup.exe
|
# when: not myrtille.stat.exists
|
|
- name: Download Myrtille to specified path only if modified
|
win_shell: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'https://github.com/cedrozor/myrtille/releases/download/v2.3.1/Myrtille_2.3.1_x86_x64_Setup.exe' -OutFile 'C:\\Temp\\Myrtille_2.3.1_x86_x64_Setup.exe'"
|
when: not myrtille.stat.exists
|
|
- name: Extract the binary
|
win_command: Myrtille_2.3.1_x86_x64_Setup.exe -o "C:\Temp" -y
|
args:
|
chdir: C:\Temp\
|
creates: C:\Temp\setup.exe
|
|
- name: Install Myrtille
|
win_package:
|
path: C:\Temp\setup.exe
|
arguments: /q
|
creates_path: C:\Program Files (x86)\Myrtille
|
|
- name: Disable NTLM RDP Authetication requirement
|
win_regedit:
|
path: HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
|
name: "{{ item }}"
|
data: 0
|
type: dword
|
with_items:
|
- SecurityLayer
|
- UserAuthentication
|
|
- name: Create RDP Application
|
win_iis_webapplication:
|
name: rdp
|
site: Default Web Site
|
application_pool: MyrtilleAppPool
|
physical_path: C:\Program Files (x86)\Myrtille\
|
state: present
|