# Can not access environment variables via lookup module

**URL:** <https://forum.ansible.com/t/can-not-access-environment-variables-via-lookup-module/18249>\
**Category:** Ansible Project\
**Created:** [May 18, 2015, 9:18am UTC](https://forum.ansible.com/t/can-not-access-environment-variables-via-lookup-module/18249 "2015-05-18T09:18:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kei\_Yamazaki](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@Kei\_Yamazaki](https://forum.ansible.com/u/Kei_Yamazaki)\
**Post date:** [May 18, 2015, 9:18am UTC](https://forum.ansible.com/t/can-not-access-environment-variables-via-lookup-module/18249/1 "2015-05-18T09:18:28Z")

</div>

`I executed following playbook that uses lookup module and the "environment" settings.`  
`But can not access environment variables.`

`How can I access environment variables?`

` `

---

<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:** [May 18, 2015, 11:21am UTC](https://forum.ansible.com/t/can-not-access-environment-variables-via-lookup-module/18249/2 "2015-05-18T11:21:54Z")

</div>

soo, lookups occur on master, environment sets the execution for the  
target machine. you are querying diff machine than you are setting.
