Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@ the `setup-config` TUI.
- Homebrew already follows this pattern with `tasks/homebrew_list.yml`
(`installed_brew_formulae`, `installed_brew_casks`, `brew_taps`).

### Package manager precedence
- Prefer Homebrew whenever `brew` is available, even on Linux where
`ansible_facts.pkg_mgr` reports `apt`. `tasks/package_manager.yml` sets
`brew_available`; gate brew tasks on `brew_available | bool`, never on
`pkg_mgr == "homebrew"`.
- Group dispatch lives in `tasks/package_group.yml`: Homebrew formulae run
first, apt supplies only packages Homebrew cannot, and casks run only on
macOS.
- `brew_apt_equivalents` in `default.config.yml` maps apt names to brew
formulae that use a different name. Same-name packages are covered
automatically from `brew formulae`.
- Set `prefer_homebrew: false` to force apt on a Linux machine that has
Homebrew installed.

### Blocks for repeated conditions
- When several tasks share the same conditional check, wrap them in a
`block:` with the `when:` at the block level so evaluation happens once.
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ the arrow keys (or `h`/`j`/`k`/`l`) to move between categories and options,
`Enter` to toggle or edit a value, `r` to reset an option, `a` to apply the
playbook, and `q` to quit. Changes are written to `~/.setup-options`.

`prefer_homebrew` (default on) makes the playbook use Homebrew formulae
ahead of apt when both are available; apt is used only for packages
Homebrew does not provide.

The tool is a standalone Python script with its dependencies declared inline
(PEP 723). It runs under [uv](https://docs.astral.sh/uv/), which the playbook
installs as a prerequisite.
Expand Down
11 changes: 11 additions & 0 deletions default.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ agent_python_packages:
- pyyaml
- jinja2

# Prefer Homebrew formulae over apt when both are available (Linuxbrew).
# Ignored on macOS, where Homebrew is the only supported package manager.
prefer_homebrew: true

# Apt package names that a Homebrew formula also provides under a different
# name. Used to avoid installing both when Homebrew is preferred.
brew_apt_equivalents:
nodejs: node
npm: node
kubectl: kubernetes-cli

vscode: false

install_apple_office: false
Expand Down
Loading
Loading