Giter VIP home page Giter VIP logo

macos-config-playbook's Introduction

macos-config-playbook

Build Status

Installation

Pre-requisites:

  • Xcode Command-Line Tools:
xcode-select --install
  • homebrew
# Looks scary, but does the job
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • ansible
brew install ansible
  • sudoers with NOPASSWD: ALL (some of the tasks require become: yes and will fail if sudo asks for a password).
- %admin  ALL = (ALL) ALL
+ %admin  ALL = (ALL) NOPASSWD: ALL

Running

To run the playbook:

ansible-playbook main.yaml

dotfiles

This is configured to install and update the following dotfiles repository.

defaults

Most of the defaults configuration is done through tasks/osx_defaults.yaml.

Unfortunately, Ansible is lacking dict and dict-add support (despite a well done PR) in its osx_defaults module, so there are a couple of scripts that can be run manually:

files/other_defaults
files/spotlight

files/other_defaults

  • Custom keyboard shortcuts require dict-add.
  • Screenshot location (it has ~ in it) is expanded at runtime and is not idempotent.

files/spotlight

  • Spotlight configuration removes all volumes but / from indexing configuration and re-builds index on /.
  • I don't recommend running this often.

Issues

This might be a Mojave Beta-only issue, but defaults write treats all passed values as strings (whether they should be booleans, integers, or floats) in a construct like this:

defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 60 "{ enabled = 1; value = { type = standard; parameters = ( 32, 49, 1048576 ); }; }"

so I have to pass all values in XML format.

Contributing

Feel free to submit issues, PRs, or just comment.

macos-config-playbook's People

Contributors

pegasd avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.