Introduce "asdf" Ansible task, install terraform and kubectl with asdf - #352
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughA new shared Ansible task file ( Changesasdf Tool Management for macOS and Debian
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ansible/roles/debian_tools/tasks/30-asdf.yaml`:
- Around line 29-36: The "Set global versions via asdf" task has `changed_when:
true` which forces it to always report as changed, breaking idempotency and
causing unnecessary noise in playbook runs. Replace this hardcoded
`changed_when: true` with a conditional that actually detects whether the asdf
version setting operation made a real change, such as by checking the command's
return code or output to determine if the version was actually modified or if it
was already set to the desired version.
In `@ansible/roles/debian_tools/tasks/main.yaml`:
- Around line 13-16: The "Install tools via asdf" task's when condition
incorrectly checks for the debian_tools_brew_install_groups variable, which is
unrelated to asdf configuration. Update the when condition to check
debian_tools_asdf_tools is defined instead, since the included 30-asdf.yaml file
loops over that variable. This ensures the asdf include task is only executed
when asdf tools are actually configured, decoupling it from the unrelated
Homebrew variable.
In `@ansible/roles/mac_base/tasks/30-asdf.yaml`:
- Around line 29-36: The "Set global versions via asdf" task uses changed_when:
true which unconditionally marks the task as changed on every run, breaking
idempotency. Replace the changed_when: true statement with a proper condition
that checks the actual output or return code from the asdf set command to
determine if the version was actually changed or was already set, ensuring the
task only reports as changed when the version actually differs from what was
previously set.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 54f65284-76fe-41e7-9460-7d33166d897f
📒 Files selected for processing (9)
ansible/inventory/group_vars/debian/vars.yamlansible/inventory/group_vars/mac/vars.yamlansible/roles/debian_tools/tasks/20-homebrew.yamlansible/roles/debian_tools/tasks/30-asdf.yamlansible/roles/debian_tools/tasks/main.yamlansible/roles/mac_base/tasks/20-homebrew.yamlansible/roles/mac_base/tasks/30-asdf.yamlansible/roles/mac_base/tasks/40-user.yamlansible/roles/mac_base/tasks/main.yaml
💤 Files with no reviewable changes (1)
- ansible/roles/debian_tools/tasks/20-homebrew.yaml
c09a6e6 to
d8272fd
Compare
Summary by CodeRabbit
New Features
Chores