# ENV variable in Anisble.cfg file

**URL:** <https://forum.ansible.com/t/env-variable-in-anisble-cfg-file/26853>\
**Category:** Ansible Project\
**Created:** [February 26, 2018, 5:37pm UTC](https://forum.ansible.com/t/env-variable-in-anisble-cfg-file/26853 "2018-02-26T17:37:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ian\_Barkley](https://avatars.discourse-cdn.com/v4/letter/i/f08c70/32.png) [@Ian\_Barkley](https://forum.ansible.com/u/Ian_Barkley)\
**Post date:** [February 26, 2018, 5:37pm UTC](https://forum.ansible.com/t/env-variable-in-anisble-cfg-file/26853/1 "2018-02-26T17:37:04Z")

</div>

I’ve noticed the documentation has moved from using $HOME to ~/ in various examples when referencing the Ansible.cfg file.  
I’m currently targeting the use of $USER to help define remote\_path. Will the behavior of using ENV variables in ansible.cfg remain (at least for the foreseeable future), or should I use another means of defining user-specific temp space?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [February 26, 2018, 7:33pm UTC](https://forum.ansible.com/t/env-variable-in-anisble-cfg-file/26853/2 "2018-02-26T19:33:10Z")

</div>

To clarify, ansible.cfg itself does not support environment variables.

SOME settings, like remote\_path do get executed inside a shell context.

This specific change was made because $HOME is not always set but  
`~user` should always be 'correctly translated' ... though there are a  
couple of cases in which it is not, they are less than the issues we  
had with $HOME.
