Add osx role

This commit is contained in:
Oliver Davies 2016-05-24 18:38:11 +01:00 committed by Oliver Davies
parent 878b9aa338
commit 642ea8196f
9 changed files with 108 additions and 0 deletions

View file

@ -12,3 +12,4 @@
- { role: geerlingguy.homebrew, tags: ['brew'] }
- { role: dotstrap.fish, tags: ['fish'] }
- { role: sublime, tags: ['sublime'] }
- { role: osx, tags: ['osx'] }

View file

@ -0,0 +1,16 @@
---
- name: killall Dock
command: killall Dock
ignore_errors: yes
- name: killall Finder
command: killall Finder
ignore_errors: yes
- name: killall SystemUIServer
command: killall SystemUIServer
ignore_errors: yes
- name: killall cfprefsd
command: killall cfprefsd
ignore_errors: yes

27
roles/osx/tasks/dock.yml Normal file
View file

@ -0,0 +1,27 @@
---
- name: Set the icon size of Dock items.
osx_defaults:
domain: com.apple.dock
key: tilesize
type: float
value: 25
notify:
- killall Dock
- name: Automatically hide and show the Dock.
osx_defaults:
domain: com.apple.dock
key: autohide
type: bool
value: true
notify:
- killall Dock
- name: Remove the autohide delay.
osx_defaults:
domain: com.apple.dock
key: autohide-delay
type: float
value: 0
notify:
- killall Dock

View file

@ -0,0 +1,23 @@
---
- name: Hide items on the Desktop.
osx_defaults:
domain: com.apple.finder
key: CreateDesktop
type: bool
value: false
notify:
- killall Finder
- name: 'When performing a search, search the current folder by default.'
command: defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
notify:
- killall Finder
- name: Disable the warning when changing a file extension.
osx_defaults:
domain: com.apple.finder
key: FXEnableExtensionChangeWarning
type: bool
value: false
notify:
- killall Finder

View file

@ -0,0 +1,7 @@
---
- name: Enable full keyboard access.
osx_defaults:
domain: NSGlobalDomain
key: AppleKeyboardUIMode
type: int
value: 2

6
roles/osx/tasks/main.yml Normal file
View file

@ -0,0 +1,6 @@
---
- include: dock.yml
- include: finder.yml
- include: keyboard.yml
- include: screensaver.yml
- include: universal-access.yml

View file

@ -0,0 +1,7 @@
---
- name: Change the location for screenshots.
osx_defaults:
domain: com.apple.screencapture
key: location
type: string
value: "~/Pictures/Screenshots"

View file

@ -0,0 +1,14 @@
---
- name: Require a password when exiting the screen saver.
osx_defaults:
domain: com.apple.screensaver
key: askForPassword
type: integer
value: 1
- name: Set the delay time for asking for the password.
osx_defaults:
domain: com.apple.screensaver
key: askForPasswordDelay
type: float
value: 0

View file

@ -0,0 +1,7 @@
---
- name: Require a password when exiting the screen saver.
osx_defaults:
domain: com.apple.universalaccess
key: reduceTransparency
type: bool
value: true