From 97f65ed8d72590e28000ba83cec27746ce4ad387 Mon Sep 17 00:00:00 2001 From: Peter Hallam Date: Mon, 30 Apr 2018 15:07:43 +0800 Subject: [PATCH] Update latest defaults and refer to wiki documentation DEV-2783 --- README.md | 6 +++--- roles/osx_defaults/defaults/main.yml | 24 ++++++++++++++++-------- roles/osx_defaults/tasks/main.yml | 9 ++++++++- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 76a21ea..ccb7085 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,15 @@ their own custom configurations. ### Set Up +**NOTE** this README assumes you are running the setup scripts and Ansible playbooks on the system that is being installed. The current preferred method is to run them from an existing system, which connects to the new system over SSH to perform the same steps. See the documentation on the Confluence wiki page, [Laptop Setup](https://agworld.atlassian.net/wiki/spaces/DEV/pages/567804018/Laptop+Setup) for a more relavant guide. + Given you have a laptop you wish to setup you should: * erase the hard drive * install the latest OSX (tested on Sierra) * join the wireless network -* configure the Mac for user, not using Apple ID +* configure the Mac for a user, not using Apple ID * run software update -* install the latest XCode -* run `xcode-select --install` to install command line tools * continue with the steps below To install, all you need to do is run `bootstrap.sh` remotely. It will install some pre-requisites (gcc, diff --git a/roles/osx_defaults/defaults/main.yml b/roles/osx_defaults/defaults/main.yml index 0c7f541..900152d 100644 --- a/roles/osx_defaults/defaults/main.yml +++ b/roles/osx_defaults/defaults/main.yml @@ -20,7 +20,7 @@ defaults: - domain: com.apple.dock key: autohide-delay type: float - value: 0.15 + value: 0 - domain: com.apple.dock key: autohide-time-modifier type: float @@ -65,6 +65,10 @@ defaults: key: PromptOnQuit # Don’t display the annoying prompt when quitting iTerm type: bool value: false + - domain: com.googlecode.iterm2 + key: PrefsCustomFolder + type: string + value: "/Users/{{ ansible_user_id }}/Documents" - domain: com.googlecode.iterm2 key: LoadPrefsFromCustomFolder type: bool @@ -106,7 +110,7 @@ defaults: type: int value: 2 - domain: NSGlobalDomain - key: com.apple.swipescrolldirection # Disable “natural” (Lion-style) scrolling + key: com.apple.swipescrolldirection # Disable "natural" (Lion-style) scrolling type: bool value: false - domain: com.apple.print.PrintingPrefs @@ -114,7 +118,7 @@ defaults: type: bool value: true - domain: com.apple.LaunchServices - key: LSQuarantine # Disable the “Are you sure you want to open this application?” dialog + key: LSQuarantine # Disable the "Are you sure you want to open this application?" dialog type: bool value: false - domain: com.apple.screensaver @@ -169,11 +173,19 @@ defaults: - domain: NSGlobalDomain key: com.apple.mouse.scaling # Mouse tracking speed type: float - value: 2 + value: 2.5 - domain: NSGlobalDomain key: com.apple.scrollwheel.scaling # Mouse scrolling speed type: float value: 0.125 + - domain: com.apple.driver.AppleBluetoothMultitouch.trackpad # Trackpad: enable tap to click for this user + key: Clicking + type: int + value: 1 + - domain: com.apple.AppleMultitouchTrackpad # Trackpad: enable tap to click for this user + key: Clicking + type: int + value: 1 - domain: NSGlobalDomain key: com.apple.trackpad.scaling # Trackpad tracking speed type: float @@ -190,7 +202,3 @@ defaults: key: AutomaticDownload type: bool value: false - - domain: /Library/Preferences/com.apple.loginwindow.plist - key: SHOWFULLNAME - type: bool - value: true diff --git a/roles/osx_defaults/tasks/main.yml b/roles/osx_defaults/tasks/main.yml index 20fec4b..cf6a100 100644 --- a/roles/osx_defaults/tasks/main.yml +++ b/roles/osx_defaults/tasks/main.yml @@ -9,10 +9,17 @@ value: "{{ item.value }}" with_items: "{{ defaults }}" +- name: Defaults | Display login window as name and password + become: true + command: defaults write /Library/Preferences/com.apple.loginwindow.plist SHOWFULLNAME -bool true + +- name: Defaults | Show volume and Blutooth in menu bar + command: defaults write com.apple.systemuiserver menuExtras -array "/System/Library/CoreServices/Menu Extras/Clock.menu" "/System/Library/CoreServices/Menu Extras/Battery.menu" "/System/Library/CoreServices/Menu Extras/AirPort.menu" "/System/Library/CoreServices/Menu Extras/Displays.menu" "/System/Library/CoreServices/Menu Extras/Volume.menu" "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" + - name: Defaults | Disable smart quotes become: true command: defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false - + - name: Defaults | Disable Spotlight indexing for any newly mounted volume become: true command: defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes"