Repository navigation
Update devcontainer to use Ansible. - #12
Merged
Merged
Conversation
Co-authored-by: kenorb <kenorb@users.noreply.github.com>
Contributor
Reviewer's GuideSwitches devcontainer provisioning from ad-hoc shell commands to an Ansible playbook and excludes devcontainer changes from triggering the main CI workflow. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider moving
become: truefrom the play level down to only those tasks that actually need privilege escalation (e.g.,aptandpipagainst system Python) so the default behavior is non-root and the playbook is easier to read and reason about. - In the
Update apt cachetask, you may want to addcache_valid_timeto avoid unnecessarily refreshing the apt cache on every devcontainer provision and speed up repeated container starts.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider moving `become: true` from the play level down to only those tasks that actually need privilege escalation (e.g., `apt` and `pip` against system Python) so the default behavior is non-root and the playbook is easier to read and reason about.
- In the `Update apt cache` task, you may want to add `cache_valid_time` to avoid unnecessarily refreshing the apt cache on every devcontainer provision and speed up repeated container starts.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
kenorb
reviewed
Apr 29, 2026
Member
|
/co Add .devcontainer/README.md with relevant information. |
Added comments for usage and guidelines in the Ansible playbook.
Contributor
Author
|
fatal: couldn't find remote ref opencode/dispatch-6e07ac-20260429144304 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applied relevant changes from PR #50 to the current repository:
Refactored Dev Container Provisioning:
.devcontainer/provision.yml: An Ansible playbook to handle system packages, Python requirements, and pre-commit hook installation..devcontainer/devcontainer.json: ReplacedpostCreateCommandand shell-basedonCreateCommandwith a singleonCreateCommandthat runs the new Ansible playbook..devcontainer/apt-packages.txtand.devcontainer/requirements-ansible.txt.Optimized GitHub Workflows:
.github/workflows/check.yml: Addedpaths-ignorefor.devcontainer/**to prevent unnecessary workflow runs on dev container changes.The new setup is more robust and leverages Ansible for consistent environment setup. Verification with
ansible-lintpassed for the new playbook.Triggered by workflow_dispatch
opencode session | github run