Conversation
Update Ansible playbooks and defaults to reference fact-based environment and user variables instead of deprecated ansible_env and ansible_user_id to ensure compatibility with newer Ansible versions and avoid variable deprecation issues. Also add a note to README to install ansible via pip3 to ensure the required tool is available for running the playbooks.
Use the loop index as the source of truth for Dock item positions instead of relying on a separate explicit pos attribute. - Add index_var to loop_control and replace item.pos with idx + 1 when adding and moving items with dockutil. - Remove redundant pos fields from defaults for all dock_add items.
- formatted Zed settings with JSONC standard
There was a problem hiding this comment.
Pull request overview
Updates the macOS development Ansible playbook for newer Ansible fact variable access, simplifies Dock item positioning, and adds a work-specific configuration set (including Zed settings formatting updates).
Changes:
- Replaced legacy Ansible variables (
ansible_env,ansible_user_id) with fact-based access (ansible_facts.env,ansible_facts.user_id) in key tasks/playbooks. - Simplified Dock positioning by deriving positions from loop index (removing per-item
posvalues in defaults). - Added
main.work.ymlanddefaults.work.ymlfor work setup, and reformatted Zed settings (JSONC-style).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tasks/global.yml | Uses ansible_facts.env.HOME for home-directory paths when creating config directories. |
| tasks/dock.yml | Computes Dock positions from loop index and removes dependence on item.pos. |
| tasks/defaults.yml | Updates .osx.sh.done checksum read path to use ansible_facts.env.HOME. |
| main.yml | Displays user via ansible_facts.user_id instead of ansible_user_id. |
| main.work.yml | Adds a work-specific playbook entrypoint using defaults.work.yml. |
| dotfiles/zed/settings.json | Reformats Zed settings to JSONC-style formatting and enables PHP formatting config. |
| defaults.yml | Updates dotfiles destination to use ansible_facts.env.HOME and removes Dock pos fields. |
| defaults.work.yml | Adds work-specific defaults (brew packages/casks, dock config, symlinks). |
| README.md | Adds note to install Ansible via pip3 install ansible. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Get checksum from .osx.sh.done file | ||
| ansible.builtin.slurp: | ||
| src: "{{ ansible_env.HOME }}/.osx.sh.done" | ||
| src: "{{ ansible_facts.env.HOME }}/.osx.sh.done" | ||
| register: osx_done_checksum |
There was a problem hiding this comment.
tasks/defaults.yml switches the slurp path to ansible_facts.env.HOME, but the later copy task still writes to {{ ansible_env.HOME }}. This is inconsistent with the rest of the PR and can reintroduce the same compatibility issue you’re fixing; update the dest path to use ansible_facts.env.HOME as well (or otherwise standardize on one source of truth).
| @@ -0,0 +1,92 @@ | |||
| --- | |||
| - name: Confiugre | |||
There was a problem hiding this comment.
Typo in play name: Confiugre should be Configure.
| - name: Confiugre | |
| - name: Configure |
Summary
Notes