Skip to content

chore(ansible): ignore stray galaxy roles under ansible/roles - #477

Merged
compscidr merged 1 commit into
mainfrom
chore/ignore-stray-galaxy-roles
Aug 5, 2026
Merged

chore(ansible): ignore stray galaxy roles under ansible/roles#477
compscidr merged 1 commit into
mainfrom
chore/ignore-stray-galaxy-roles

Conversation

@compscidr

Copy link
Copy Markdown
Owner

Twice now, galaxy roles installed into ansible/roles/ (instead of the configured .galaxy-roles/) have been swept into a commit by a broad git add — most recently 89 files in #475, and previously in #471.

The existing setup is correct: ansible.cfg puts ./.galaxy-roles first in roles_path, CI installs there, and ansible/.gitignore already excludes it. The only gap is that nothing guards ansible/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 under ansible/roles/ therefore blocks the mistake with no effect on our own roles.

Verified both directions: a test testns.testrole/ directory is ignored and invisible to git status; ansible/roles/rust_game remains fully tracked.

🤖 Generated with Claude Code

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>
Copilot AI lite review requested due to automatic review settings August 4, 2026 23:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 .gitignore rule to ignore dotted (namespaced) role directories under ansible/roles/.
  • Document the rationale in ansible/.gitignore to 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.

@compscidr
compscidr merged commit fe00be7 into main Aug 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants