-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathplaybook-de-windows-2022-small.yml
107 lines (90 loc) · 5.47 KB
/
playbook-de-windows-2022-small.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
- hosts: windows
become: true
gather_facts: yes
vars:
# chocolatey_packages:
# - 7zip.install
# - firefox
# - fslogix
language_experience_pack_download_dir: 'D:\temp'
language_experience_packs: ["de-de"]
# Copies the current user's international settings
# (Windows Display language, Input language, Regional Format/locale, and Location/GeoID)
# to one or both of the following:
# Welcome screen and system accounts
# New user accounts
win_globalization_copy_to_system_and_user: true
# Geographical Locations
# https://docs.microsoft.com/en-us/windows/win32/intl/table-of-geographical-locations?redirectedfrom=MSDN
win_globalization_geo_id: 94
# HKLM:\SYSTEM\CurrentControlSet\Control\MUI\Settings
# PreferredUILanguages
win_globalization_system_mui: 'de-DE'
win_globalization_system_locale: 'de-DE'
win_globalization_system_timezone: 'W. Europe Standard Time'
win_globalization_user_locale: 'de-DE'
# Input Locales
# https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-input-locales-for-windows-language-packs
win_globalization_user_input: '0407:00000407'
roles:
- { name: ansible-role-win2022-languagepack }
- { name: ansible-role-win-globalization }
pre_tasks:
# This task is not necessary but a nice optimization
- name: Optimize powershell
win_shell: |
[Net.ServicePointManager]::SecurityProtocol = 'Tls12'
iex ((New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/andif888/optimize-powershell-assemblies/master/optimize-powershell-assemblies.ps1'))
- name: Install Chocolatey
win_shell: |
[Net.ServicePointManager]::SecurityProtocol = 'Tls12'
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
$env:Path += ";" + $env:AllUsersProfile + "\chocolatey\bin"
tasks:
# This task is not necessary because ansible connects using SSH, but it's quite nice to have WINRM working
- name: Configure remote for ansible
win_shell: |
[Net.ServicePointManager]::SecurityProtocol = 'Tls12'
iex ((New-Object System.Net.Webclient).DownloadString('https://github.com/ansible/ansible/raw/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'))
- name: Remove Appx Packages
win_shell: |
Get-AppXPackage | Where {($_.NonRemovable -eq $false) -and ($_.IsFramework -eq $false)} | Remove-AppXPackage -ErrorAction SilentlyContinue
ignore_errors: yes
# This task is not necessary but shows how to integrate ansible-roles
# - name: Include role ansible-role-win-restic
# include_role:
# name: ansible-role-win-restic
# vars:
# restic_version: '0.12.1'
# This task is not necessary but installs some software
# - name: Install packages with chocolatey
# win_chocolatey:
# name: '{{ item }}'
# state: present
# loop: '{{ chocolatey_packages }}'
# - name: Include role ansible-role-win-regedit
# include_role:
# name: ansible-role-win-regedit
# vars:
# win_registry_items:
# - { path: "HKLM:\\Software\\FSLogix\\Profiles", name: "DeleteLocalProfileWhenVHDShouldApply", data: 1, type: dword, state: present }
# - { path: "HKLM:\\Software\\FSLogix\\Profiles", name: "Enabled", data: 1, type: dword, state: present }
# - { path: "HKLM:\\Software\\FSLogix\\Profiles", name: "FlipFlopProfileDirectoryName", data: 1, type: dword, state: present }
# - { path: "HKLM:\\Software\\FSLogix\\Profiles", name: "IsDynamic", data: 1, type: dword, state: present }
# - { path: "HKLM:\\Software\\FSLogix\\Profiles", name: "SizeInMBs", data: 1024, type: dword, state: present }
# - { path: "HKLM:\\Software\\FSLogix\\Profiles", name: "VHDLocations", data: ['\\ppravdsta.file.core.windows.net\fslogix\profilecontainer'], type: multistring, state: present }
# - { path: "HKLM:\\Software\\FSLogix\\Profiles", name: "VHDXSectorSize", data: 4096, type: dword, state: present }
# - { path: "HKLM:\\Software\\FSLogix\\Profiles", name: "VolumeType", data: "vhdx", type: string, state: present }
# - { path: "HKLM:\\Software\\Policies\\FSLogix\\ODFC", name: "Enabled", data: 1, type: dword, state: present }
# - { path: "HKLM:\\Software\\Policies\\FSLogix\\ODFC", name: "FlipFlopProfileDirectoryName", data: 1, type: dword, state: present }
# - { path: "HKLM:\\Software\\Policies\\FSLogix\\ODFC", name: "IsDynamic", data: 1, type: dword, state: present }
# - { path: "HKLM:\\Software\\Policies\\FSLogix\\ODFC", name: "IncludeTeams", data: 1, type: dword, state: present }
# - { path: "HKLM:\\Software\\Policies\\FSLogix\\ODFC", name: "SizeInMBs", data: 1024, type: dword, state: present }
# - { path: "HKLM:\\Software\\Policies\\FSLogix\\ODFC", name: "VHDLocations", data: ['\\ppravdsta.file.core.windows.net\fslogix\officecontainer'], type: multistring, state: present }
# - { path: "HKLM:\\Software\\Policies\\FSLogix\\ODFC", name: "VHDXSectorSize", data: 4096, type: dword, state: present }
# - { path: "HKLM:\\Software\\Policies\\FSLogix\\ODFC", name: "VolumeType", data: "vhdx", type: string, state: present }
# - name: Shortcut frxtray
# win_shortcut:
# src: '%ProgramFiles%\FSLogix\Apps\frxtray.exe'
# dest: '%ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup\frxtray.lnk'