chore(ansible): ignore stray galaxy roles under ansible/roles - #477
Merged
Conversation
Galaxy roles install to .galaxy-roles/ per ansible.cfg, but nothing stopped a stray install under ansible/roles/ from being swept into a commit (it happened twice). Galaxy roles are namespaced with a dot; local roles use underscores, so ignoring dotted directories there blocks the mistake without touching our roles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Ready to approve
The ignore rule is narrowly scoped to dotted role directories under ansible/roles/ and aligns with the stated roles_path/naming conventions without impacting local roles.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Adds a guardrail in the Ansible repo to prevent accidentally committing Galaxy-installed roles that were mistakenly installed into ansible/roles/ instead of the configured .galaxy-roles/ path.
Changes:
- Add a
.gitignorerule to ignore dotted (namespaced) role directories underansible/roles/. - Document the rationale in
ansible/.gitignoreto clarify intended role location and naming conventions.
File summaries
| File | Description |
|---|---|
| ansible/.gitignore | Ignores stray Galaxy-style namespace.role directories under roles/ to prevent accidental commits. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
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.
Twice now, galaxy roles installed into
ansible/roles/(instead of the configured.galaxy-roles/) have been swept into a commit by a broadgit add— most recently 89 files in #475, and previously in #471.The existing setup is correct:
ansible.cfgputs./.galaxy-rolesfirst inroles_path, CI installs there, andansible/.gitignorealready excludes it. The only gap is that nothing guardsansible/roles/itself against a stray install.Galaxy roles are always namespaced (
geerlingguy.php); all 25 local roles use underscores (rust_game,media_server). Ignoring dotted directories underansible/roles/therefore blocks the mistake with no effect on our own roles.Verified both directions: a test
testns.testrole/directory is ignored and invisible togit status;ansible/roles/rust_gameremains fully tracked.🤖 Generated with Claude Code