This repository contains Ansible playbooks, roles, and a setup script to configure a MacOS environment. It includes tasks for installing Homebrew, various packages, casks, dotfiles, shell configurations, and Java versions.
- Supported MacOS version 15.0.0 or higher (tested)
- Internet connection for downloading packages and casks
Note: While this setup has been tested on MacOS 15, it may also work on others
- playbook.yml: This is the main playbook that orchestrates the setup process.
- config.yaml: Variables and configurations used by the playbooks.
- homebrew: Installs and updates Homebrew, and installs specified packages and casks.
- dotfiles: Clones the dotfiles repository and uses
stow
to manage symbolic links. - shell: Configures the shell, installs Oh-My-Zsh, and sets custom paths.
- java: Installs specified Java versions, updates
cacerts
, and configuresjenv
.
The following Homebrew packages will be installed:
- tree
- htop
- jq
- yq
- neovim
- stow (default)
- ripgrep-all (default)
The following Homebrew casks will be installed:
- microsoft-teams
- postman
- autodesk-fusion
- microsoft-office
- visual-studio-code
- dotfiles_git_repo:
git@github.com:PeterMue/dotfiles.git
- dotfiles_dest:
~/.dotfiles
- dotfiles_version:
main
The following Java versions will be installed:
- zulu@21
- zulu@17
- zulu@8
- java_cacerts_uri: URL to download updated
cacerts
file.
A setup script is included to install necessary command line tools, upgrade pip, install Ansible, and clone this repository.
The setup.sh
script automates the initial setup process. It performs the following tasks:
- Installs Command Line Tools (if not already installed)
- Upgrades pip to the latest version
- Installs Ansible
- Clones this repository
- Runs the Ansible playbooks
- Run the setup script directly from the repository:
curl -fsSL https://raw.githubusercontent.com/PeterMue/macos-setup/main/setup.sh | sh
-
Fork the repository and clone it:
git clone git@github.com:YourUsername/macos-setup.git cd macos-setup
-
Create the
config.yaml
file with your configurations:homebrew_packages: - logi-options+ homebrew_casks: [] dotfiles_git_repo: 'git@github.com:PeterMue/dotfiles.git' java_versions: - zulu@21 - zulu@17 - zulu@8 java_cacerts_uri: https://your-cacerts-uri
-
Run the playbook:
ansible-galaxy install -r requirements.yaml ansible-playbook playbook.yml --ask-become-pass
Feel free to open issues and submit pull requests for any improvements or fixes.
This project is licensed under the MIT License.