# Puppet-elasticsearch module not deploying elasticsearch.yml

**URL:** <https://discuss.elastic.co/t/puppet-elasticsearch-module-not-deploying-elasticsearch-yml/174015>\
**Category:** Elasticsearch\
**Created:** [March 26, 2019, 10:12pm UTC](https://discuss.elastic.co/t/puppet-elasticsearch-module-not-deploying-elasticsearch-yml/174015 "2019-03-26T22:12:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_L](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_l/32/42834_2.png) [@Alex\_L](https://discuss.elastic.co/u/Alex_L)\
**Post date:** [March 26, 2019, 10:12pm UTC](https://discuss.elastic.co/t/puppet-elasticsearch-module-not-deploying-elasticsearch-yml/174015/1 "2019-03-26T22:12:32Z")

</div>

I am trying to manage the elasticsearch.yml file at the default location of /etc/elasticsearch/elasticsearch.yml

The following works fine, but isn't what I want:

```
class { 'elasticsearch':
    version => '6.2.4',
    status => 'disabled',
    datadir_instance_directories => false,
    instances => {
      $facts['hostname'] => {
        'config' => {
          'network.host' => '_site_',
          'node.name' => $facts['hostname'],
        }
      }
    }
  }

```

It creates a file at /etc/elasticsearch/elastic-node01/elasticsearch.yaml

I then tried the following configuration (which from the documentation I read, I think should work, but it isn't working)

```
class { 'elasticsearch':
    version => '6.2.4',
    status => 'disabled',
    datadir_instance_directories => false,
    config => {
      'cluster' => {
        'network.host' => '_site_',
        'node.name' => $facts['hostname'],
      }
    }
  }

```

Both configurations run without errors, but in the second configuration, no file is created at /etc/elasticsearch/elasticsearch.yml, in fact, puppet actually spits out the following:

```
Notice: /Stage[main]/Elasticsearch::Package/Package[elasticsearch]/ensure: created
Info: /Stage[main]/Elasticsearch::Package/Package[elasticsearch]: Scheduling refresh of Exec[remove_plugin_dir]
Notice: /Stage[main]/Elasticsearch::Package/Exec[remove_plugin_dir]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Elasticsearch::Config/File[/usr/share/elasticsearch/plugins]/ensure: created
Notice: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/scripts]/ensure: created
Info: Computing checksum on file /etc/elasticsearch/elasticsearch.yml
Info: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/elasticsearch.yml]: Filebucketed /etc/elasticsearch/elasticsearch.yml to puppet with sum 3aa77775c113d3828a9e8e87637eb286
Notice: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/elasticsearch.yml]/ensure: removed
Info: Computing checksum on file /etc/elasticsearch/jvm.options
Info: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/jvm.options]: Filebucketed /etc/elasticsearch/jvm.options to puppet with sum 775a7b047687f7389149bff042a0e04d
Notice: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/jvm.options]/ensure: removed
Info: Computing checksum on file /etc/elasticsearch/log4j2.properties
Info: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/log4j2.properties]: Filebucketed /etc/elasticsearch/log4j2.properties to puppet with sum b3030447ca9e02e0e19b2c3d38bea137
Notice: /Stage[main]/Elasticsearch::Config/File[/etc/elasticsearch/log4j2.properties]/ensure: removed

```

Any suggestions?

I am using module version 6.3.3 with Puppet 5.3

> **[elastic/puppet-elasticsearch](https://github.com/elastic/puppet-elasticsearch)**
>
> Elasticsearch Puppet module. Contribute to elastic/puppet-elasticsearch development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [March 27, 2019, 8:18am UTC](https://discuss.elastic.co/t/puppet-elasticsearch-module-not-deploying-elasticsearch-yml/174015/2 "2019-03-27T08:18:22Z")

</div>

Hi @Alex_L,

Check `/etc/elasticsearch/$facts['hostname']/`. The puppet module is done so that you can run more than one Elasticsearch instance per machine.

An example from one of my machines that have two instances ( `es-00` and `es-01`)

```
# find /etc/elasticsearch/
...
/etc/elasticsearch/es-00
/etc/elasticsearch/es-00/scripts
/etc/elasticsearch/es-00/logging.yml
/etc/elasticsearch/es-00/jvm.options
/etc/elasticsearch/es-00/log4j2.properties
/etc/elasticsearch/es-00/elasticsearch.yml
/etc/elasticsearch/es-00/ingest-geoip
/etc/elasticsearch/es-00/ingest-geoip/GeoLite2-Country.mmdb
/etc/elasticsearch/es-00/ingest-geoip/GeoLite2-ASN.mmdb
/etc/elasticsearch/es-00/ingest-geoip/GeoLite2-City.mmdb
/etc/elasticsearch/es-00/elasticsearch.keystore
/etc/elasticsearch/es-01
/etc/elasticsearch/es-01/scripts
/etc/elasticsearch/es-01/logging.yml
/etc/elasticsearch/es-01/jvm.options
/etc/elasticsearch/es-01/log4j2.properties
/etc/elasticsearch/es-01/elasticsearch.yml
/etc/elasticsearch/es-01/ingest-geoip
/etc/elasticsearch/es-01/ingest-geoip/GeoLite2-Country.mmdb
/etc/elasticsearch/es-01/ingest-geoip/GeoLite2-ASN.mmdb
/etc/elasticsearch/es-01/ingest-geoip/GeoLite2-City.mmdb
/etc/elasticsearch/es-01/elasticsearch.keystore
...

```

It comes from [https://github.com/elastic/puppet-elasticsearch/blob/master/manifests/instance.pp#L136](https://github.com/elastic/puppet-elasticsearch/blob/master/manifests/instance.pp#L136)

---

<div class="post-metadata">

**Author:** ![Alex\_L](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_l/32/42834_2.png) [@Alex\_L](https://discuss.elastic.co/u/Alex_L)\
**Post date:** [March 27, 2019, 8:57am UTC](https://discuss.elastic.co/t/puppet-elasticsearch-module-not-deploying-elasticsearch-yml/174015/3 "2019-03-27T08:57:20Z")

</div>

Thanks for your answer. Based on what you have said, I don't think I explained myself properly. I only want to run **one** instance of elasticsearch on the server. I want to use the puppet module to install based on the default elastic configuration i.e: /etc/elasticsearch/elasticsearch.yml and **not** /etc/elasticsearch/my-instance-name/elasticsearch.yml

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [March 27, 2019, 9:03am UTC](https://discuss.elastic.co/t/puppet-elasticsearch-module-not-deploying-elasticsearch-yml/174015/4 "2019-03-27T09:03:23Z")

</div>

Then _this is not the puppet module you are looking for_👋

I use the same module for machines where I run just one Elasticsearch instance. The config dir I use is `/etc/elasticsearch/es-00/`

Maybe there are properties to the puppet module I don't know of...

The README.md does state

> This module works with the concept of instances. For service to start you need to specify at least one instance.

> **[GitHub - voxpupuli/puppet-elasticsearch: Elasticsearch Puppet module](https://github.com/voxpupuli/puppet-elasticsearch#instances)**
>
> Elasticsearch Puppet module. Contribute to voxpupuli/puppet-elasticsearch development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Alex\_L](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_l/32/42834_2.png) [@Alex\_L](https://discuss.elastic.co/u/Alex_L)\
**Post date:** [March 27, 2019, 10:37am UTC](https://discuss.elastic.co/t/puppet-elasticsearch-module-not-deploying-elasticsearch-yml/174015/5 "2019-03-27T10:37:51Z")

</div>

Thank you for pointing that out to me.  
I realize now that I can still use this module for a single instance. Just need to adapt to the new locations of all the files and system services etc.

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [March 27, 2019, 10:41am UTC](https://discuss.elastic.co/t/puppet-elasticsearch-module-not-deploying-elasticsearch-yml/174015/6 "2019-03-27T10:41:33Z")

</div>

The module creates individual SystemD unit files for each instance. I have only needed to customize a few things to get ES ingest nodes with specific plugins to work (especially on machines that run several ES nodes but over all I am very happy with the puppet module 🙂

---

<div class="post-metadata">

**Author:** ![tylerjl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylerjl/32/44965_2.png) [@tylerjl](https://discuss.elastic.co/u/tylerjl)\
**Post date:** [March 27, 2019, 10:55pm UTC](https://discuss.elastic.co/t/puppet-elasticsearch-module-not-deploying-elasticsearch-yml/174015/7 "2019-03-27T22:55:15Z")

</div>

Howdy! The confusion and non-standard setup here is one reason why [we're probably going to drop support for multiple instances](https://github.com/elastic/puppet-elasticsearch/issues/1025), since it's the source of lots of bugs. If there's specific feedback about whether this does/does not seem like a good idea to keep or drop, we'd love feedback on the aforementioned github issue. 👍

---

<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:** [April 24, 2019, 10:55pm UTC](https://discuss.elastic.co/t/puppet-elasticsearch-module-not-deploying-elasticsearch-yml/174015/8 "2019-04-24T22:55:26Z")

</div>

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