-
-
Notifications
You must be signed in to change notification settings - Fork 102
/
main.yml
44 lines (39 loc) · 1.33 KB
/
main.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
---
##############
# Shortnames #
##############
# Ensures that directories have an 8dot3 shortname
- name: Query to see if shortnames are enabled
win_shell: "fsutil 8dot3name query C: | grep enabled"
register: enabled_shortnames
failed_when: false
tags:
- shortnames
- name: Enable shortnames in Registry
win_regedit:
path: HKLM:\SYSTEM\CurrentControlSet\Control\Filesystem
name: NtfsDisable8dot3NameCreation
data: 2
type: dword
when: (not enabled_shortnames.stdout)
tags:
- shortnames
# Note that using "set C: 0" did not work in containers
- name: Enable shortnames
win_shell: "fsutil 8dot3name set 0"
when: (not enabled_shortnames.stdout)
tags:
- shortnames
- name: Create 8dot3 shortnames
script: scripts/shortName.ps1 "{{ item.name }}" "{{ item.shortname }}"
with_items:
- {name: "Microsoft Visual Studio", shortname: "MIB055~1"}
- {name: "Microsoft Visual Studio 9.0", shortname: "MICROS~2.0"}
- {name: "Microsoft Visual Studio 10.0", shortname: "MICROS~3.0"}
- {name: "Microsoft Visual Studio 11.0", shortname: "MICROS~4.0"}
- {name: "Microsoft Visual Studio 12.0", shortname: "MICROS~1.0"}
- {name: "Microsoft Visual Studio 14.0", shortname: "MI0E91~1.0"}
- {name: "Windows Kits", shortname: "WINDOW~4"}
when: (not enabled_shortnames.stdout)
tags:
- shortnames