Skip to content

Conversation

@stopendy
Copy link

@stopendy stopendy commented Oct 18, 2025

New Feature: role_var_prefix Option

This PR adds a new configuration option called role_var_prefix.

It allows us to tweak role variable's prefix pattern with regular expression. Common use cases include prefix role variable with collection name.

The default value is "^_*{role}_", which should be fully compatible with the previous implementation, where we should always prefix role variables with role name with further prefixing with underscore (_) being allowed.

If someone could review the concept and implementation and allow this PR to be merged, that would be great.

(Background) Existing Issues

This feature addresses following issues:

It also covers following Ansible Forum discussions:

@stopendy stopendy requested a review from a team as a code owner October 18, 2025 21:30
@stopendy stopendy changed the title Feature/add role var prefix option feat: add role var prefix option Oct 18, 2025
@stopendy
Copy link
Author

stopendy commented Oct 19, 2025

Hmm I guess auto-labeling CI failed because two labels were mixed up (feat/chore)? If that is the case I will have to fix up two commits into a feat commit.

Since I’m not familiar with CI, could someone confirm that my approach is worth trying? I don’t even know I can force push back and forth for testing here.

Or maybe maintainers could label this PR manually as feat instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants