# JAVA\_HOME not getting set via chef (provider\_configure.rb)

**URL:** <https://discuss.elastic.co/t/java-home-not-getting-set-via-chef-provider-configure-rb/265659>\
**Category:** Elasticsearch\
**Created:** [February 26, 2021, 7:56pm UTC](https://discuss.elastic.co/t/java-home-not-getting-set-via-chef-provider-configure-rb/265659 "2021-02-26T19:56:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sb116](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@sb116](https://discuss.elastic.co/u/sb116)\
**Post date:** [February 26, 2021, 7:56pm UTC](https://discuss.elastic.co/t/java-home-not-getting-set-via-chef-provider-configure-rb/265659/1 "2021-02-26T19:56:46Z")

</div>

```auto
Hello, I would like to set JAVA_HOME at `/etc/default/elasticsearch` via `provider_configure.rb`, and I setting up JAVA_HOME via role; for some reason, the env variable is not getting set on the target host.

Any thoughts or advice on what am i missing?

```

---

<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:** [March 26, 2021, 7:56pm UTC](https://discuss.elastic.co/t/java-home-not-getting-set-via-chef-provider-configure-rb/265659/2 "2021-03-26T19:56:47Z")

</div>

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