# Dictionary keys and global variable namespace clash?

**URL:** <https://forum.ansible.com/t/dictionary-keys-and-global-variable-namespace-clash/17895>\
**Category:** Ansible Project\
**Created:** [April 2, 2015, 6:35pm UTC](https://forum.ansible.com/t/dictionary-keys-and-global-variable-namespace-clash/17895 "2015-04-02T18:35:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jameel\_Al-Aziz1](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Jameel\_Al-Aziz1](https://forum.ansible.com/u/Jameel_Al-Aziz1)\
**Post date:** [April 2, 2015, 6:35pm UTC](https://forum.ansible.com/t/dictionary-keys-and-global-variable-namespace-clash/17895/1 "2015-04-02T18:35:47Z")

</div>

I’m not sure if this is a bug or intended behavior.

If I have the following playbook (the database\_url variable actually lives in a separate var file):

`

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [April 2, 2015, 7:25pm UTC](https://forum.ansible.com/t/dictionary-keys-and-global-variable-namespace-clash/17895/2 "2015-04-02T19:25:06Z")

</div>

environment is a reserved keyword, you should not be using it as a  
variable name.

---

<div class="post-metadata">

**Author:** ![Jameel\_Al-Aziz1](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Jameel\_Al-Aziz1](https://forum.ansible.com/u/Jameel_Al-Aziz1)\
**Post date:** [April 2, 2015, 7:30pm UTC](https://forum.ansible.com/t/dictionary-keys-and-global-variable-namespace-clash/17895/3 "2015-04-02T19:30:47Z")

</div>

Wow. My bad.

Changing it to env makes everything work. Thanks for pointing that out!
