# How to set the ES\_TMPDIR environment variable with ansible-elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-set-the-es-tmpdir-environment-variable-with-ansible-elasticsearch/228020>\
**Category:** Elasticsearch\
**Created:** [April 15, 2020, 3:22am UTC](https://discuss.elastic.co/t/how-to-set-the-es-tmpdir-environment-variable-with-ansible-elasticsearch/228020 "2020-04-15T03:22:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dokuhebi](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@dokuhebi](https://discuss.elastic.co/u/dokuhebi)\
**Post date:** [April 15, 2020, 3:22am UTC](https://discuss.elastic.co/t/how-to-set-the-es-tmpdir-environment-variable-with-ansible-elasticsearch/228020/1 "2020-04-15T03:22:37Z")

</div>

We're using the ansible-elasticsearch ansible role to configure our instances, and so far, it's working well. There's one problem we're running into, and that is that, due to government security requirements, /tmp needs to be on it's own partition and have the noexec flag set. Looking at the documentation, it seems like we can change the ES\_TMPDIR environment variable to change the temp directory, but I don't see a way to do this with the role itself.

I can probably submit a merge request to allow that configuration, but I'm not able to full test the fix with anything other than CentOS 7. Can anyone help me get this resolved?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 13, 2020, 3:22am UTC](https://discuss.elastic.co/t/how-to-set-the-es-tmpdir-environment-variable-with-ansible-elasticsearch/228020/2 "2020-05-13T03:22:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
