From 2c1774939b38f86995eb72c9940e4b153ad104ea Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 11 Apr 2019 01:56:02 +0100 Subject: [PATCH] Add macos.yml --- main.yml | 2 ++ tasks/macos.yml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 tasks/macos.yml diff --git a/main.yml b/main.yml index c995b2a..22e1a21 100644 --- a/main.yml +++ b/main.yml @@ -11,6 +11,8 @@ tasks: - { include: tasks/sudoers.yml, tags: ['osx'] } - { include: tasks/sublime.yml, tags: ['sublime'] } + - include: tasks/macos.yml + tags: ['macos'] roles: - { role: geerlingguy.dotfiles, tags: ['dotfiles'] } diff --git a/tasks/macos.yml b/tasks/macos.yml new file mode 100644 index 0000000..c346165 --- /dev/null +++ b/tasks/macos.yml @@ -0,0 +1,63 @@ +--- +- name: Hide the menu bar by default + osx_defaults: + domain: 'Apple Global Domain' + key: _HIHideMenuBar + type: bool + value: true + +- name: Check for software updates daily, not just once per week + osx_defaults: + domain: com.apple.SoftwareUpdate + key: ScheduleFrequency + type: integer + value: 1 + +- name: Download newly available updates in background + osx_defaults: + domain: com.apple.SoftwareUpdate + key: AutomaticDownload + type: integer + value: 1 + +- name: Install System data files & security updates + osx_defaults: + domain: com.apple.SoftwareUpdate + key: CriticalUpdateInstall + type: integer + value: 1 + +- name: Automatically download apps purchased on other Macs + osx_defaults: + domain: com.apple.SoftwareUpdate + key: ConfigDataInstall + type: integer + value: 1 + +- name: Turn on app auto-update + osx_defaults: + domain: com.apple.commerce + key: AutoUpdate + type: boolean + value: true + +- name: Allow the App Store to reboot machine on macOS updates + osx_defaults: + domain: com.apple.commerce + key: AutoUpdateRestartRequired + type: boolean + value: true + +- name: 'Finder: allow quitting via ⌘+Q; doing so will also hide desktop icons' + osx_defaults: + domain: com.apple.finder + key: QuitMenuItem + type: boolean + value: true + +- name: Kill affected applications + command: 'killall {{ item }}' + with_items: + - Dock + - Finder + - SystemUIServer