Skip to content

Commit 5acd4de

Browse files
authored
Merge pull request #51 from chez-shanpu/role-mac
Add mac role
2 parents 9f38e17 + 0d95afb commit 5acd4de

File tree

2 files changed

+176
-0
lines changed

2 files changed

+176
-0
lines changed

dev-provisioning.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
- name: common
66
tags: common
77

8+
- name: mac
9+
tags: mac
10+
when: ansible_os_family == "Darwin"
11+
812
- name: dotfiles
913
tags: dotfiles
1014

roles/mac/tasks/main.yaml

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
- name: Use Dark mode
2+
osx_defaults:
3+
key: AppleInterfaceStyle
4+
type: string
5+
value: "Dark"
6+
state: present
7+
8+
- name: Disable auto sort in working space
9+
osx_defaults:
10+
domain: com.apple.dock
11+
key: mru-spaces
12+
type: bool
13+
value: false
14+
state: present
15+
16+
- name: Dock autohide
17+
osx_defaults:
18+
domain: com.apple.dock
19+
key: autohide
20+
type: bool
21+
value: true
22+
state: present
23+
24+
- name: Enable two finger tap
25+
osx_defaults:
26+
domain: com.apple.AppleMultitouchTrackpad
27+
key: TrackpadCornerSecondaryClick
28+
type: int
29+
value: 2
30+
state: present
31+
32+
- name: Enable tap as click
33+
osx_defaults:
34+
domain: com.apple.AppleMultitouchTrackpad
35+
key: Clicking
36+
type: int
37+
value: 1
38+
state: present
39+
40+
- name: Automatically open a new Finder window when a volume is mounted
41+
block:
42+
- osx_defaults:
43+
domain: com.apple.frameworks.diskimages
44+
key: auto-open-ro-root
45+
type: bool
46+
value: true
47+
state: present
48+
49+
- osx_defaults:
50+
domain: com.apple.frameworks.diskimages
51+
key: auto-open-rw-root
52+
type: bool
53+
value: true
54+
state: present
55+
56+
- osx_defaults:
57+
domain: com.apple.finder
58+
key: OpenWindowForNewRemovableDisk
59+
type: bool
60+
value: true
61+
state: present
62+
63+
- name: Set HOME dir as the default location for new Finder windows
64+
block:
65+
- osx_defaults:
66+
domain: com.apple.finder
67+
key: NewWindowTarget
68+
type: string
69+
value: "PfDe"
70+
state: present
71+
72+
- osx_defaults:
73+
domain: com.apple.finder
74+
key: NewWindowTargetPath
75+
type: string
76+
value: "file://${HOME}/"
77+
state: present
78+
79+
- name: Show Status bar in Finder
80+
osx_defaults:
81+
domain: com.apple.finder
82+
key: ShowStatusBar
83+
type: bool
84+
value: true
85+
state: present
86+
87+
- name: Show Path bar in Finder
88+
osx_defaults:
89+
domain: com.apple.finder
90+
key: ShowPathbar
91+
type: bool
92+
value: true
93+
state: present
94+
95+
- name: Show Tab bar in Finder
96+
osx_defaults:
97+
domain: com.apple.finder
98+
key: ShowTabView
99+
type: bool
100+
value: true
101+
state: present
102+
103+
- name: Show the hidden files
104+
osx_defaults:
105+
domain: com.apple.finder
106+
key: AppleShowAllFiles
107+
type: string
108+
value: "TRUE"
109+
state: present
110+
111+
- name: Date format
112+
osx_defaults:
113+
domain: com.apple.menuextra.clock
114+
key: DateFormat
115+
type: string
116+
value: "M\\U6708d\\U65e5(EEE) H:mm:ss"
117+
state: present
118+
119+
- name: Key repeat
120+
osx_defaults:
121+
key: InitialKeyRepeat
122+
type: int
123+
value: 15
124+
state: present
125+
126+
- name: Use fn keys as function keys in external keyboards
127+
osx_defaults:
128+
domain: com.apple.keyboard
129+
key: fnState
130+
type: bool
131+
value: true
132+
state: present
133+
134+
- name: Font
135+
osx_defaults:
136+
domain: com.apple.inputmethod.Kotoeri
137+
key: JIMPrefCandidateWindowFontKey
138+
type: string
139+
value: "HiraginoSans-W4"
140+
state: present
141+
142+
- name: Font Size
143+
osx_defaults:
144+
domain: com.apple.inputmethod.Kotoeri
145+
key: JIMPrefCandidateWindowFontSizeKey
146+
type: int
147+
value: 16
148+
state: present
149+
150+
- name: Use slack key as a dot
151+
osx_defaults:
152+
domain: com.apple.inputmethod.Kotoeri
153+
key: JIMPrefCharacterForSlashKey
154+
type: int
155+
value: 1
156+
state: present
157+
158+
- name: Use yen key as back-slash
159+
osx_defaults:
160+
domain: com.apple.inputmethod.Kotoeri
161+
key: JIMPrefCharacterForYenKey
162+
type: int
163+
value: 1
164+
state: present
165+
166+
- name: Not FullWidthNumeralCharacters
167+
osx_defaults:
168+
domain: com.apple.inputmethod.Kotoeri
169+
key: JIMPrefFullWidthNumeralCharactersKey
170+
type: int
171+
value: 0
172+
state: present

0 commit comments

Comments
 (0)