You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**This directory is gitignored** - your customizations stay local
135
135
-**Pull upstream cleanly** - no merge conflicts with your overrides
136
136
137
+
## Variable Scope Behavior
138
+
139
+
**Important:** Variables loaded from `overrides/roles/{role}/vars/main.yml` persist for the entire playbook run.
140
+
141
+
This is standard Ansible behavior - `include_vars` loads into play scope. After a role runs, its override variables remain set for all subsequent roles.
142
+
143
+
### Best Practices
144
+
145
+
1.**Use role-prefixed variable names** - `git_user_email` not `user_email`
146
+
2.**Check role defaults first** - `roles/{role}/defaults/main.yml` shows expected names
147
+
3.**Avoid generic names** - `config`, `version`, `name` could collide with other roles
148
+
4.**Override only what you need** - fewer variables = fewer collision chances
149
+
150
+
This behavior matches how `group_vars/` works in Ansible - it's not a bug, just something to be aware of.
0 commit comments