This an Ansible Playbook to provision my macOS.
It will :
- create useful directories.
- install packages (brew(and taps), asdf, npm).
- copy dotfiles which configure various applications(Git, npm, terraform, asdf) in home.
- copy some zsh script, mainly for configuration and some helper functions and aliases.
- install brew : brew.sh/
- install ansible :
brew install ansible - checkout project in
~/Projects/wk_perso/macos-setup/macos-provision. - copy
roles/mac-dev-playbook/files/ansible/ansible.cfgin ~/.ansible.cfg - init file
inventoryfile in~/.ansible/inventorye.g.
[localhost]
${HOSTNAME}
- then go to
~/Projects/wk_perso/macos-setup/macos-provision. - run
ansible-playbook main.yml --diff --verbose --inventory ~/.inventory --limit $(hostname). - authenticate to GitHub
gh auth login
- change default shell
chsh -s $(which zsh)
Two functions are provided :
macconfigwill open project with code
- Configure iTerm2 https://apple.stackexchange.com/questions/136928/using-alt-cmd-right-left-arrow-in-iterm
Terraform tools are documented in terraform-family.md.
- I talked about this project at DevFest Strasbourg 2023: https://www.youtube.com/watch?v=3EVxJo2A5a8
At your own risk, this playbook doesn't aim to be used by someone else, it's just to share how I provision my computers.
mise install- To Renew GPG keys, use this script:
gpg-generate-key.sh
More GPG commands see gpg-cheatsheet.md.
-
Look at the excellent article here by https://github.com/Thomgrus: https://www.sfeir.dev/securite/securite-signer-ses-commits/
-
Look at https://www.jetbrains.com/help/idea/set-up-GPG-commit-signing.html#enable-commit-signing for Setup GPG keys.