From 4ff5187492fd06ee542cdaf2547249b2193123ee Mon Sep 17 00:00:00 2001 From: Isaac Halvorson Date: Thu, 24 Sep 2026 12:51:25 -0500 Subject: [PATCH] refactor: target macOS 26 only --- README.md | 22 +++++++++------------- inventory/group_vars/macos_15_agents.yml | 22 ---------------------- inventory/group_vars/macos_26_agents.yml | 19 ------------------- inventory/group_vars/macos_agents.yml | 17 +++++++++++++++++ mise.toml | 4 ++-- playbooks/provision.yml | 9 --------- roles/macos_updates/tasks/update.yml | 2 +- roles/rosetta/tasks/main.yml | 1 - roles/system_config/tasks/gatekeeper.yml | 10 ---------- 9 files changed, 29 insertions(+), 77 deletions(-) delete mode 100644 inventory/group_vars/macos_15_agents.yml delete mode 100644 inventory/group_vars/macos_26_agents.yml diff --git a/README.md b/README.md index 5a46f64..069aa03 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # hisaac-ci -Ansible-first automation for provisioning macOS CI agents using Tart for VM management. +Ansible-first automation for provisioning macOS 26 CI agents using Tart for VM management. ## Overview -This repository provisions macOS Tart VMs using Ansible roles and playbooks. +This repository provisions macOS 26 (Tahoe) Tart VMs using Ansible roles and playbooks. Other macOS versions are not supported; provisioning assumes the guest already runs macOS 26. The current active stack is: @@ -22,9 +22,7 @@ The current active stack is: ├── inventory/ │ ├── macos_inventory.py │ └── group_vars/ -│ ├── macos_agents.yml -│ ├── macos_15_agents.yml -│ └── macos_26_agents.yml +│ └── macos_agents.yml ├── playbooks/ │ └── provision.yml ├── roles/ @@ -52,8 +50,8 @@ The current active stack is: - macOS host for Tart-based workflows - [mise](https://mise.jdx.dev) -- Tart VMs prepared locally (if using dynamic Tart inventory) -- Pre-staged Xcode `.xip` and Simulator Runtime `.dmg` assets for the target OS version(s) +- macOS 26 Tart VMs prepared locally +- Pre-staged Xcode `.xip` and Simulator Runtime `.dmg` assets for the configured Xcode and iOS versions ## Setup @@ -82,12 +80,10 @@ Pass `-i inventory/macos_inventory.py` and set `VM_NAME` to the Tart VM to provi - `inventory/macos_inventory.py` discovers the VM IP via `tart ip ` - The VM belongs directly to `macos_agents` -- The playbook loads version-specific configuration after detecting the guest macOS version +- All agents use the same macOS 26 configuration; there is no OS-version selection or per-version preset loading +- macOS updates are restricted to 26.x; provisioning does not upgrade guests to a newer major release -Primary variable files: - -- `inventory/group_vars/macos_agents.yml`: agent settings (admin credentials, Homebrew packages including `tart-guest-agent`, the `openai/tools` tap, and Dock config) -- `inventory/group_vars/macos_15_agents.yml` and `inventory/group_vars/macos_26_agents.yml`: Xcode/runtime/simulator presets +`inventory/group_vars/macos_agents.yml` contains all agent settings: admin credentials, Homebrew packages including `tart-guest-agent`, the `openai/tools` tap, Dock config, and Xcode/runtime/simulator presets. ## Xcode Cache Inputs @@ -130,7 +126,7 @@ Playbook role order in `playbooks/provision.yml` is intentional: - `mise run run-tart-vm macos:26`: starts the named Tart VM and waits for SSH readiness - `mise run provision macos:26`: starts the named Tart VM, then runs the provisioning playbook -Replace `macos:26` with your local Tart VM name. +Replace `macos:26` with your local macOS 26 Tart VM name. The name identifies the VM; it does not select an OS version. ## Linting and Formatting diff --git a/inventory/group_vars/macos_15_agents.yml b/inventory/group_vars/macos_15_agents.yml deleted file mode 100644 index 5140f2d..0000000 --- a/inventory/group_vars/macos_15_agents.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Preset for hosts in inventory group macos_15_agents. - -# Xcode - -# Xcode .xip files must be pre-staged in the admin user's Downloads folder before provisioning. -xcode_default_version: "26.0.1" -xcode_simruntime_downloads: - - build_version: "18.2" - - build_version: "18.6" - - build_version: "26.0.1" - architecture_variant: arm64 -xcode_simulators: - - name: "iPhone 16" - device_type: "iPhone 16" - runtime: "com.apple.CoreSimulator.SimRuntime.iOS-18-2" - - name: "iPhone 16" - device_type: "iPhone 16" - runtime: "com.apple.CoreSimulator.SimRuntime.iOS-18-6" - - name: "iPhone 17" - device_type: "iPhone 17" - runtime: "com.apple.CoreSimulator.SimRuntime.iOS-26-0" diff --git a/inventory/group_vars/macos_26_agents.yml b/inventory/group_vars/macos_26_agents.yml deleted file mode 100644 index a3bf2ea..0000000 --- a/inventory/group_vars/macos_26_agents.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# Preset for hosts in inventory group macos_26_agents. - -# Xcode - -# Xcode .xip files must be pre-staged in the admin user's Downloads folder before provisioning. -xcode_default_version: "26.5.0" -xcode_simruntime_downloads: - - build_version: "26.0.1" - architecture_variant: arm64 - - build_version: "26.5" - architecture_variant: arm64 -xcode_simulators: - - name: "iPhone 17" - device_type: "iPhone 17" - runtime: "com.apple.CoreSimulator.SimRuntime.iOS-26-0" - - name: "iPhone 17" - device_type: "iPhone 17" - runtime: "com.apple.CoreSimulator.SimRuntime.iOS-26-5" diff --git a/inventory/group_vars/macos_agents.yml b/inventory/group_vars/macos_agents.yml index c6d054b..4073c9e 100644 --- a/inventory/group_vars/macos_agents.yml +++ b/inventory/group_vars/macos_agents.yml @@ -11,6 +11,23 @@ ansible_ssh_password_mechanism: ssh_askpass xcode_install_enabled: true macos_update_enabled: true +# Xcode + +# Xcode .xip files must be pre-staged in the admin user's Downloads folder before provisioning. +xcode_default_version: "26.5.0" +xcode_simruntime_downloads: + - build_version: "26.0.1" + architecture_variant: arm64 + - build_version: "26.5" + architecture_variant: arm64 +xcode_simulators: + - name: "iPhone 17" + device_type: "iPhone 17" + runtime: "com.apple.CoreSimulator.SimRuntime.iOS-26-0" + - name: "iPhone 17" + device_type: "iPhone 17" + runtime: "com.apple.CoreSimulator.SimRuntime.iOS-26-5" + # Homebrew homebrew_upgrade_all_packages: true diff --git a/mise.toml b/mise.toml index 6bf7fc5..b8d17d8 100644 --- a/mise.toml +++ b/mise.toml @@ -54,7 +54,7 @@ run = "hk fix --all" run = "scripts/cache-xcodes.bash" [tasks.run-tart-vm] -usage = 'arg "" help="Specific Tart VM to start (e.g. macos:15). Starts all VMs if omitted." default=""' +usage = 'arg "" help="Specific macOS 26 Tart VM to start (e.g. macos:26). Starts all VMs if omitted." default=""' run = ''' nohup tart run "$vm" > /dev/null 2>&1 & echo "Waiting for $vm to have an IP..." @@ -66,7 +66,7 @@ echo "$vm is ready" ''' [tasks.provision] -usage = 'arg "" help="Name of the Tart VM to provision"' +usage = 'arg "" help="Name of the macOS 26 Tart VM to provision"' depends = ["run-tart-vm {{ usage.vm }}"] run = 'VM_NAME="{{ usage.vm }}" ansible-playbook playbooks/provision.yml -i inventory/macos_inventory.py' diff --git a/playbooks/provision.yml b/playbooks/provision.yml index 0925c90..95e417d 100644 --- a/playbooks/provision.yml +++ b/playbooks/provision.yml @@ -64,15 +64,6 @@ when: xcode_clt_update_label != '' changed_when: true -- name: Load macOS version-specific configuration - hosts: macos_agents - gather_facts: true - tasks: - - name: Load macOS version vars - ansible.builtin.include_vars: - file: "{{ playbook_dir }}/../inventory/group_vars/macos_{{ ansible_facts['distribution_major_version'] }}_agents.yml" - failed_when: false - - name: Install macOS updates hosts: macos_agents tags: [macos_updates] diff --git a/roles/macos_updates/tasks/update.yml b/roles/macos_updates/tasks/update.yml index 869cb58..30f842e 100644 --- a/roles/macos_updates/tasks/update.yml +++ b/roles/macos_updates/tasks/update.yml @@ -38,7 +38,7 @@ async: 1800 poll: 30 when: >- - not item.label.startswith('macOS') or item.version.split('.')[0] == ansible_facts['distribution_version'].split('.')[0] + not item.label.startswith('macOS') or item.version.split('.')[0] == '26' - name: Check if any updates were actually installed ansible.builtin.set_fact: diff --git a/roles/rosetta/tasks/main.yml b/roles/rosetta/tasks/main.yml index 8f9d16b..ec9c309 100644 --- a/roles/rosetta/tasks/main.yml +++ b/roles/rosetta/tasks/main.yml @@ -7,7 +7,6 @@ failed_when: false when: ansible_facts['architecture'] == 'arm64' -# On macOS Sonoma (14.0) a benign "Package Authoring Error" may appear in output but installation succeeds. - name: Install Rosetta 2 ansible.builtin.command: cmd: softwareupdate --install-rosetta --agree-to-license diff --git a/roles/system_config/tasks/gatekeeper.yml b/roles/system_config/tasks/gatekeeper.yml index 4138371..67ab204 100644 --- a/roles/system_config/tasks/gatekeeper.yml +++ b/roles/system_config/tasks/gatekeeper.yml @@ -1,16 +1,6 @@ --- # Note: These tasks require SIP to be disabled on the target system. -# Note: On macOS 26+, spctl --master-disable requires GUI interaction in -# System Settings to fully take effect. This command alone is insufficient -# but is kept for reference and for older macOS versions. -- name: Disable Gatekeeper - ansible.builtin.command: - cmd: spctl --master-disable - become: true - changed_when: true - failed_when: false - - name: Enable Developer Mode for Terminal ansible.builtin.command: cmd: spctl developer-mode enable-terminal