Use Ansible to setup your newly installed mac
$ ssh-keygen -t rsa -b 4096 -C "my@email.com"
$ eval "$(ssh-agent -s)"
$ vim ~/.ssh/config
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
$ ssh-add -K ~/.ssh/id_rsa
$ cat ~/.ssh/id_rsa.pub | pbcopy
and Follow: https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install ansible
$ mkdir ~/Git
$ git clone git@github.com:silefort/ansiblemymac.git ~/Git/ansiblemymac
$ cd ~/Git/ansiblemac
$ ansible-galaxy install geerlingguy.homebrew
$ ansible-playbook main.yml -i inventory.ini -K
- Remap Caps Lock to Ctrl ( Clavier / Touches de Modification )
- Put the Dock on the left ( Dock )
- Make the Dock disappear automatically ( Dock )
- Change the color preset of iTerm ( Preferences / Profiles / Colors )
- Change the font of iTerm ( Menlo / Bold )
- Change Mouse Setup ( Sens du défilement naturel )
Ideas stolen from:
- https://blog.vandenbrand.org/2016/01/04/how-to-automate-your-mac-os-x-setup-with-ansible/
- https://github.com/mtneug/cfg_mgmt-macos
- https://github.com/geerlingguy/macos-virtualbox-vm
- https://github.com/MWGriffin/ansible-playbooks
- https://github.com/geerlingguy/mac-dev-playbook
TODO:
- Automatic dotfiles (bash, vimrc, tmux...)
- different roles depending on pro or personnal computer
- CI
- Map Caps Lock to Ctrl from the command line ( no manual action )