host_vars/group_vars issue with ansible 1.1+

Well, in fact I already answered on myself on ansible with a "/me slaps himself : since 1.1+ ${environment} can’t be used and it’s now internally used … time to update my inventory/playbooks/templates "

We use(d) a variable called ‘environment’ (to reflect our usual environments : acc/pil/prod - aka acceptance/pilot/production) but starting with 1.1 it’s not possible anymore (and that can be found in your blog post too - http://blog.ansibleworks.com/2013/04/02/ansible-1-1-released/ ) :
“Another powerful feature I want to highlight — the new “environment” keyword can quickly swap in environment settings for different tasks, allowing users to easily work with multiple proxy servers (or no proxy server) when dealing with content coming from different sources.”

It’s just after having posted that thread that I discovered that only that variable wasn’t correctly interpreted/translated/rendered … so a wild grep environment in the code showed me why :slight_smile:
I so tweeted also directly after that : "Just updated massively our #ansible playbooks/templates/inventory to not use ‘environment’ anymore to be #ansible 1.1 compatible #varcheck" :wink:

Fabian

So is the issue the environment keyword should just set something internally like __environment to avoid possible conflicts with some existing use of a variable named environment?

That seems reasonable if so.