About
dotfiles
on ansible fully automate configuration of Mac OS X development machine, inlcuding setting up non-dev apps and settings (check osx-host role).
Setup
Warning: Make sure you fork this repo and adjust it to your own preferences before even starting the setup.
-
Install brew, git, pip, ansible.
-
Clone this repo.
-
Copy GPG key to location, specified in
gpg_key_file
variable. -
Run
$ ansible-galaxy install -r requirements.yml $ ansible-playbook -i hosts playbooks/setup_dev_env.yml
and provide ansible with the variables it asks for (ssh password, pass utility git origin).
-
Add newly generated ssh keys to github/etc.
-
Save passphrase[s] of newly generated ssh keys to your password manager (
pass
, in case of this repo).
Usage
After setup is done, you can execute only parts of the setup by specifying tag[s].
$ ansible-playbook -i hosts playbooks/setup_dev_env.yml -t <tags>
Tags:
brew
[tasks] - setup brew taps, packages, cask appssdkman
[tasks] - SDKMAN! is a tool for managing JDK environments and tools: java, scala, maven, etc.git
[tasks] - symlink git dotfiles, setup git hooks for dotfiles repogpg
[tasks] - import gpg keypip
[tasks] - install pip packagesiterm2
[tasks] - setup iterm2 to use custom folder for preferencesnode
[tasks] - download and install nvm, node, npm packagespass
[tasks] - setup password managerssh-ident
[tasks] - download and install ssh-identssh
[tasks] - create ssh keys based on specifiedssh_keys
variable datavscode
[tasks] - symlink vscode settings and install vscode extensionszsh
[tasks] - ensure zsh and oh-my-zsh are installed and symlinkedpermissions
- make sure the files have correct permissionsdock
[tasks] - dock preferencesfinder
[tasks] - finder settingssystemuiserver
[tasks] - systemuiserver(specifically, menu bar) settings (battery, clock, bluetooth)mission-control
[tasks] - mission control settings
Note:
roles/<role>/vars/main.yml
in each role is supposed to contain secret information. The format of the secret information is described in roles/<role>/vars/main.example.yml
file. It's loaded automatically by ansible.
Thanks to
Inspired by lots of repositories and articles, but most importantly:
- https://github.com/mathiasbynens/dotfiles - awesome collection of settings.
- https://github.com/geerlingguy/mac-dev-playbook and https://blog.vandenbrand.org/2016/01/04/how-to-automate-your-mac-os-x-setup-with-ansible/ - a lot of valuable info on how to start with ansible dotfiles.