Skip to content

Commit

Permalink
Remove Vagrant and old licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdavidbell committed Jan 2, 2024
1 parent 23ff03d commit c26cb59
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 147 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
set -e
if [[ "${anything_changed}" -gt 0 ]]; then
echo "Playbook not idempotent!"
echo "TODO -> Playbook is not idempotent!"
fi
- run: echo "🍏 This job's status is ${{ job.status }}."
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
vault_password_file
.vagrant
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
# Ansible macOS infrastructure provisioning
![CI workflow status](https://github.com/andrewdavidbell/macos-infra/actions/workflows/ci.yml/badge.svg)

Ansible automation to configure my macOS machines
# Overview
This Ansible provisioning script was born out of my desire to simplify the onboarding of a new Apple Mac. It's expected to be ran locally rather than from a control machine. I use two inventories for my different machines, one for home and the other for work. A single _site_ Playbook (a naming convention hangover from using Puppet) is used to apply the relevant inventory's configuration. Roles are used to specify the infrastructure for each application.

Over the years I've had various attempts to automate the onboarding of a new Apple Mac, either bespoke or using other tooling such as [Boxen](https://github.blog/2013-02-15-introducing-boxen/). Previously, I attempted to build a role per application but often took too long and I just wanted to get on an use the machine!

Specifing a list of packages (via group variables for the particular inventory) to be installed by [Homebrew](https://brew.sh/) as proven to be the easiest to maintain.

Maintaining the System Preferences script has been time consuming as each release of macOS often broke the configuration. For now I configure these elements of macOS manually to suit my personal preferences.

Recently, I've started to install fewer applications natively and make use of Visual Studio Code's development containers.

# How to bootstrap
Use the following command to clone this git repository and install the necessary prerequisite software (Homebrew and Ansible).
Then, run the playbook as instructed by the script:
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/andrewdavidbell/macos-infra/HEAD/install.sh)"
```
73 changes: 0 additions & 73 deletions Vagrantfile

This file was deleted.

5 changes: 4 additions & 1 deletion group_vars/home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ zsh_config_dir: "~/Documents/Config/zsh"

homebrew_casks:
- 1password
- arduino
# - arduino
- docker
- firefox
- google-chrome
- google-cloud-sdk
- iterm2
- little-snitch
- logi-options-plus
Expand All @@ -29,3 +31,4 @@ homebrew_formulae:
- awscli
- git
- jq
- shellcheck
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function main() {

# install_ansible_vault_password
echo "Run the following command to provision the infrastructure:"
echo "ansible-playbook -i <home|work|client> site.yml -v"
echo "ansible-playbook -i <home|work> site.yml -v"
}

main
2 changes: 1 addition & 1 deletion roles/git/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github_email: "[email protected]"
github_email: "8567862+[email protected]"
26 changes: 0 additions & 26 deletions roles/snitch/files/License.plist

This file was deleted.

27 changes: 0 additions & 27 deletions roles/snitch/files/registration.xpl

This file was deleted.

30 changes: 15 additions & 15 deletions roles/snitch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
name: little-snitch
state: present

- name: Install Little Snitch license
copy:
src: registration.xpl
dest: "/Library/Application\ Support/Objective\ Development/Little\ Snitch/"
owner: root
group: wheel
mode: 0600
become: true
# - name: Install Little Snitch license
# copy:
# src: registration.xpl
# dest: "/Library/Application\ Support/Objective\ Development/Little\ Snitch/"
# owner: root
# group: wheel
# mode: 0600
# become: true

- name: Install Micro Snitch
homebrew_cask:
name: micro-snitch
state: present

- name: Install Micro Snitch license
copy:
src: License.plist
dest: "{{ ansible_user_dir }}/Library/Application\ Support/Micro\ Snitch/"
owner: "{{ ansible_user_id }}"
group: staff
mode: 0644
# - name: Install Micro Snitch license
# copy:
# src: License.plist
# dest: "{{ ansible_user_dir }}/Library/Application\ Support/Micro\ Snitch/"
# owner: "{{ ansible_user_id }}"
# group: staff
# mode: 0644

0 comments on commit c26cb59

Please sign in to comment.