macbook-qa

Log | Files | Refs | README

README.md (2720B)


      1 # Macbook QA Workstation Provisioning
      2 
      3 > **Work in progress** — not yet suitable for production use.
      4 
      5 Ansible playbook that sets up a MacBook Pro for QA work. Installs and configures:
      6 
      7 - **Xcode** (full IDE, installed via Mac App Store)
      8 - **Homebrew** (package manager)
      9 - **Google Chrome**
     10 - **iTerm2**
     11 - **OBS Studio**
     12 - **Powerlevel10k** (Zsh theme)
     13 
     14 Supports both Apple Silicon (M-series) and Intel Macs.
     15 
     16 ---
     17 
     18 ## Prerequisites
     19 
     20 ### 1. Sign into the Mac App Store
     21 
     22 Xcode is installed from the Mac App Store. The playbook will fail with a clear message if you skip this step, but do it first to avoid interruption:
     23 
     24 **System Settings → App Store → Sign In**
     25 
     26 ### 2. Install Xcode Command Line Tools
     27 
     28 This provides Python 3 and the developer tools required to run the playbook:
     29 
     30 ```bash
     31 xcode-select --install
     32 ```
     33 
     34 A GUI dialog will appear — click **Install** and wait for it to complete before continuing.
     35 
     36 ### 3. Install Ansible
     37 
     38 ```bash
     39 pip3 install ansible
     40 ```
     41 
     42 Verify it worked:
     43 
     44 ```bash
     45 ansible --version
     46 ```
     47 
     48 ### 4. Install the required Ansible collection
     49 
     50 ```bash
     51 ansible-galaxy collection install -r requirements.yml
     52 ```
     53 
     54 ---
     55 
     56 ## Running the Playbook
     57 
     58 ### Dry run (no changes made)
     59 
     60 Always do this first to see what Ansible plans to do:
     61 
     62 ```bash
     63 ansible-playbook -i inventory/local.ini site.yml --check --diff
     64 ```
     65 
     66 ### Apply
     67 
     68 ```bash
     69 ansible-playbook -i inventory/local.ini site.yml
     70 ```
     71 
     72 
     73 > **Note on Powerlevel10k:** After the playbook finishes, run `p10k configure` in a new terminal to set up your prompt style.
     74 
     75 ---
     76 
     77 ## Customization
     78 
     79 ### Add Homebrew packages
     80 
     81 Edit `group_vars/all.yml` and add to the `homebrew_packages` list:
     82 
     83 ```yaml
     84 homebrew_packages:
     85   - git
     86   - wget
     87   - curl
     88   - jq
     89   - your-package-here
     90 ```
     91 
     92 ### Add Homebrew casks (GUI apps)
     93 
     94 Add to the `homebrew_casks` list in the same file:
     95 
     96 ```yaml
     97 homebrew_casks:
     98   - slack
     99   - postman
    100 ```
    101 
    102 ### iTerm2 preferences
    103 
    104 To deploy a shared iTerm2 config, export your preferences from iTerm2:
    105 
    106 **iTerm2 → Settings → General → Preferences → "Export preferences to a custom folder"**
    107 
    108 Copy the exported `com.googlecode.iterm2.plist` into:
    109 
    110 ```
    111 roles/iterm2/files/com.googlecode.iterm2.plist
    112 ```
    113 
    114 The playbook will pick it up automatically on the next run.
    115 
    116 > **Warning:** iTerm2 prefs can contain stored SSH passwords or profile credentials. This file is listed in `.gitignore` — do not force-add it to git.
    117 
    118 ### Powerlevel10k config
    119 
    120 To share a pre-baked prompt config, copy your `~/.p10k.zsh` into:
    121 
    122 ```
    123 roles/powerlevel10k/files/.p10k.zsh
    124 ```
    125 
    126 The playbook will deploy it to `~` on the target machine.
    127 
    128 ---
    129 
    130 ## Re-running
    131 
    132 The playbook is fully idempotent — running it again on an already-provisioned Mac produces zero changes.