javydekoning / mac-dev-playbook

Mac setup and configuration via Ansible.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mac Dev Playbook Logo

Mac Development Ansible Playbook

CI

This playbook installs and configures most of the software I use on my Mac for web and software development. Some things in macOS are slightly difficult to automate, so I still have a few manual installation steps, but at least it's all documented here.

Installation

  1. Ensure Apple's command line tools are installed (xcode-select --install to launch the installer).

  2. Install Ansible:

    1. Run the following command to add Python 3 to your $PATH: export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH"
    2. Upgrade Pip: sudo pip3 install --upgrade pip
    3. Install Ansible: pip3 install ansible
  3. Clone or download this repository to your local drive.

  4. Run ansible-galaxy install -r requirements.yml inside this directory to install required Ansible roles.

  5. Run ansible-playbook main.yml --ask-become-pass inside this directory. Enter your macOS account password when prompted for the 'BECOME' password.

Running a specific set of tagged tasks

You can filter which part of the provisioning process to run by specifying a set of tags using ansible-playbook's --tags flag. The tags available are dotfiles, homebrew, mas, extra-packages and osx.

ansible-playbook main.yml -K --tags "dotfiles,homebrew"

Testing the Playbook

Many people have asked me if I often wipe my entire workstation and start from scratch just to test changes to the playbook. Nope! This project is continuously tested on GitHub Actions' macOS infrastructure.

Ansible for DevOps

Check out Ansible for DevOps, which teaches you how to automate almost anything with Ansible.

Author

This project was created by Javy de Koning, forked from Jeff Geerling.

About

Mac setup and configuration via Ansible.

License:Other


Languages

Language:Shell 62.3%Language:Jinja 37.7%