This is my mac; there are many like it, but this one is mine.
-
Install XCode developer tools:
xcode-select --install || echo "xcode-select has been installed already, probably." # then hit install on the GUI popup
-
Get bootstrapped:
curl --location --fail --show-error --silent https://github.com/petemounce/workstation/archive/refs/heads/master.zip --output "workstation-master.zip" unzip -d "." "workstation-master.zip" cd workstation-master bash bin/bootstrap.sh [[ -d ".venv" ]] && source ".venv/bin/activate" bash bin/run.sh --list-tasks
-
To avoid needing to use
--ask-become-pass
and typing your user's password on every run-through:https://jpmens.net/2021/12/17/ansible-vault-password-in-macos-keychain/
-
Make an ansible vault password inside macOS keychain to avoid needing to type your account password every run-through:
security add-generic-password -a "${USER}" -j "ansible-vault password for workstation repo" -s "workstation" -w
... and supply a password then confirm it.
-
Make an ansible-vault encrypted file with your user account's password in it, like:
ansible-vault create "secrets.yml"
... with content:
ansible_become_password: 'your password' brew_password: 'brew user's password' # Choose something easy to type... github_token: personal: '' work: ''
-
-
Download an XCode xip (because
download.developer.apple.com
requires authentication):-
Set
vars/Darwin.yml
xcode_version
if needed. -
Sign in with an Apple ID.
-
Download the version you want.
-
Move it to where ansible will look for it:
mkdir -p "${HOME}/.cache/xcode-installers" mv "${HOME}/Download/Xcode_{xcode_version}.xip" "${HOME}/.cache/xcode-installers/Xcode_{xcode_version}.xip"
-
-
If you're happy with that set of tasks and have read what they do:
bin/run.sh
You can pass flags and arguments to
bin/run.sh
andansible-playbook
will receive them.