# Get facts control machine

**URL:** <https://forum.ansible.com/t/get-facts-control-machine/19890>\
**Category:** Ansible Project\
**Created:** [November 30, 2015, 12:27am UTC](https://forum.ansible.com/t/get-facts-control-machine/19890 "2015-11-30T00:27:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Steinbach](https://avatars.discourse-cdn.com/v4/letter/t/df788c/32.png) [@Thomas\_Steinbach](https://forum.ansible.com/u/Thomas_Steinbach)\
**Post date:** [November 30, 2015, 12:27am UTC](https://forum.ansible.com/t/get-facts-control-machine/19890/1 "2015-11-30T00:27:21Z")

</div>

Hi, I want to fetch some files from the remote server and store them in the home directory of the user executing the playbook. How do I get the ‘ansible\_user\_dir’ of the ansible control machine? I can’t use ‘$HOME’ or ‘~’, because those statements would not work with all Ansible modules.

---

<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:** [December 2, 2015, 2:55am UTC](https://forum.ansible.com/t/get-facts-control-machine/19890/2 "2015-12-02T02:55:25Z")

</div>

lookup('env', 'HOME) should give you the home dir of the 'current user  
executing ansible'. Also ~ and $HOME should work with the fetch  
module.
