This repo contains an Ansible script that setup an Intel based macOS Monterey. Inspiration commes from those repo:
Follow those instructions to launch the workstation setup.
- Download script file from github
- Make the script executable:
chmod 755 ./setup.sh
- Launch it:
./setup.sh
- Enter in the folder of the cloned repo.
- If needed, update config & inventory files and copy ssh keys.
- Launch the Ansible script
ansible-playbook ansible-osx-setup/playbook.yml --ask-become-pass --ask-vault-pass
What's gona do the pre-flight script
- Verify internet connection
- Install xcode
- Install homebrew
- Install python
- Install ansible
- Clone the repo containing the ansible script
What's gona do the ansible script
- Update the hostname
- Install or create new ssh keys
- Install homebrew packages
- Setup git
- Install & setup iterm
- Install & setup zsh
- Install & setup vin
- Install & setup vscode
- Create my folder architecture
The goal of this script is to reconfigure my workstation, this includes having my ssh keys ready to be used. I order to have the less action to do, I've just setup the script to copy/paste my ssh key in the right directory.
As my keys will be stored outside my computer for backup, I wanted to have them securely stored. That's why I will be using the following command to encrypt them.
Ansible script will perform, with a given password, the decription and the movement of the key to the ssh folder.
Each keys need to be encrypt with this command.
ansible-vault encrypt ssh-key-name
In order to test this script, you'll need to create a macOS VM and run the script. Follow this tuto to create a MacOS VM: How to create a Mac OS VM
You can also use ansible test tool to verify that ansible script is executables with the --check
command.
- Vim throws and error at the launch & no plugin are active : Perform a
:PlugInstall
to launch the installation of all the plugins in the vimrc and plug file. It happens that the command in the vim tasks script didn't work.