# acccess my environment variable in remote host

**URL:** <https://forum.ansible.com/t/acccess-my-environment-variable-in-remote-host/20943>\
**Category:** Ansible Project\
**Created:** [March 21, 2016, 12:04pm UTC](https://forum.ansible.com/t/acccess-my-environment-variable-in-remote-host/20943 "2016-03-21T12:04:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pandithurai\_S](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@Pandithurai\_S](https://forum.ansible.com/u/Pandithurai_S)\
**Post date:** [March 21, 2016, 12:04pm UTC](https://forum.ansible.com/t/acccess-my-environment-variable-in-remote-host/20943/1 "2016-03-21T12:04:40Z")

</div>

Hi Team,

I need to access my jenkins environment variable in the script which i placed in remote host.

for ex:

---

<div class="post-metadata">

**Author:** ![Uditha\_Desilva](https://avatars.discourse-cdn.com/v4/letter/u/f475e1/32.png) [@Uditha\_Desilva](https://forum.ansible.com/u/Uditha_Desilva)\
**Post date:** [March 23, 2016, 11:52am UTC](https://forum.ansible.com/t/acccess-my-environment-variable-in-remote-host/20943/2 "2016-03-23T11:52:19Z")

</div>

Sorry, not clear to me what machine you’re setting your environment variable.

If it’s on the Ansible controller, look it up and pass it to the module on the controller, Ansible will “embed” all such arguments into the module source before pushing it over to the remote node.

If it’s on the remote system, well… Ansible doesn’t source your environment there, so you will need to read that out of your config file and parse it (via the controller) before passing it to the module.
