# Puppet Enterprise elasticsearch config hash?

**URL:** <https://discuss.elastic.co/t/puppet-enterprise-elasticsearch-config-hash/17129>\
**Category:** Elasticsearch\
**Created:** [April 22, 2014, 4:30pm UTC](https://discuss.elastic.co/t/puppet-enterprise-elasticsearch-config-hash/17129 "2014-04-22T16:30:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Neal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_neal/32/3527_2.png) [@Chris\_Neal](https://discuss.elastic.co/u/Chris_Neal)\
**Post date:** [April 22, 2014, 4:30pm UTC](https://discuss.elastic.co/t/puppet-enterprise-elasticsearch-config-hash/17129/1 "2014-04-22T16:30:02Z")

</div>

Hi all,

This is most likely a noob question, so I apologize. I've googled as well  
and was not able to find an answer to this seeminly basic question.  
I'm using Puppet Enterprise 3.1.2 along with this module to install/manage  
Elasticsearch:  
[https://forge.puppetlabs.com/elasticsearch/elasticsearch/0.2.3](https://forge.puppetlabs.com/elasticsearch/elasticsearch/0.2.3)

I've added the elasticsearch class to my node definition, and when I try  
and pass the hash to the 'config' variable, my runs fail with various  
errors about the parameter being a string, not a hash.

I've tried:

class { 'elasticsearch':  
config =\> {  
'node' =\> {  
'name' =\> 'elasticsearch001'  
},  
'index' =\> {  
'number\_of\_replicas' =\> '0',  
'number\_of\_shards' =\> '5'  
},  
'network' =\> {  
'host' =\> $::ipaddress  
}  
}  
}

and also:

config =\> {  
'node' =\> {  
'name' =\> 'elasticsearch001'  
},  
'index' =\> {  
'number\_of\_replicas' =\> '0',  
'number\_of\_shards' =\> '5'  
},  
'network' =\> {  
'host' =\> $::ipaddress  
}  
}

and also:

{  
'node' =\> {  
'name' =\> 'elasticsearch001'  
},  
'index' =\> {  
'number\_of\_replicas' =\> '0',  
'number\_of\_shards' =\> '5'  
},  
'network' =\> {  
'host' =\> $::ipaddress  
}

All result in something like this:

====================  
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:  
" config =\> { 'node' =\> { 'name' =\> 'elasticsearch001' }, 'index' =\> {  
'number\_of\_replicas' =\> '0', 'number\_of\_shards' =\> '5' }, 'network' =\> {  
'host' =\> $::ipaddress } }" is not a Hash. It looks to be a String at  
/etc/puppetlabs/puppet/modules/elasticsearch/manifests/init.pp:242 on node  
[n6.example.com](http://n6.example.com)

Warning: Not using cache on failed catalog

# Error: Could not retrieve catalog; skipping run

How exactly would I pass a hash to this variable so that it will work?

Thanks so much.  
Chris

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/58e5ece8-bb3c-4d0f-92c1-8d950bc4f714%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/58e5ece8-bb3c-4d0f-92c1-8d950bc4f714%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Kelly\_Sauke](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@Kelly\_Sauke](https://discuss.elastic.co/u/Kelly_Sauke)\
**Post date:** [April 22, 2014, 6:22pm UTC](https://discuss.elastic.co/t/puppet-enterprise-elasticsearch-config-hash/17129/2 "2014-04-22T18:22:07Z")

</div>

This is what my class looks like using the same elasticsearch module in  
puppet and it works for me.

class { 'elasticsearch':  
package\_url =\>  
'puppet:///extra\_files/elasticsearch-1.1.0.noarch.rpm',  
java\_install =\> true,  
config =\> {  
'cluster' =\> {  
'name' =\> 'puppet-test-cluster',  
},  
'node' =\> {  
'name' =\> 'puppet-test-node',  
}  
}

}

On 04/22/2014 11:30 AM, Chris Neal wrote:

> Hi all,
> 
> This is most likely a noob question, so I apologize. I've googled as  
> well and was not able to find an answer to this seeminly basic question.  
> I'm using Puppet Enterprise 3.1.2 along with this module to  
> install/manage Elasticsearch:  
> [https://forge.puppetlabs.com/elasticsearch/elasticsearch/0.2.3](https://forge.puppetlabs.com/elasticsearch/elasticsearch/0.2.3)
> 
> I've added the elasticsearch class to my node definition, and when I  
> try and pass the hash to the 'config' variable, my runs fail with  
> various errors about the parameter being a string, not a hash.
> 
> I've tried:  
> | class { 'elasticsearch':  
> config =\> {  
> 'node' =\> {  
> 'name' =\> 'elasticsearch001'  
> },  
> 'index' =\> {  
> 'number\_of\_replicas' =\> '0',  
> 'number\_of\_shards' =\> '5'  
> },  
> 'network' =\> {  
> 'host' =\> $::ipaddress  
> }  
> }  
> }|  
> and also:
> 
> |config =\> {  
> 'node' =\> {  
> 'name' =\> 'elasticsearch001'  
> },  
> 'index' =\> {  
> 'number\_of\_replicas' =\> '0',  
> 'number\_of\_shards' =\> '5'  
> },  
> 'network' =\> {  
> 'host' =\> $::ipaddress  
> }  
> }|  
> and also:  
> |{  
> 'node' =\> {  
> 'name' =\> 'elasticsearch001'  
> },  
> 'index' =\> {  
> 'number\_of\_replicas' =\> '0',  
> 'number\_of\_shards' =\> '5'  
> },  
> 'network' =\> {  
> 'host' =\> $::ipaddress  
> }|  
> All result in something like this:
> 
> ====================  
> Error: Could not retrieve catalog from remote server: Error 400 on  
> SERVER: " config =\> { 'node' =\> { 'name' =\> 'elasticsearch001' },  
> 'index' =\> { 'number\_of\_replicas' =\> '0', 'number\_of\_shards' =\> '5' },  
> 'network' =\> { 'host' =\> $::ipaddress } }" is not a Hash. It looks to  
> be a String at  
> /etc/puppetlabs/puppet/modules/elasticsearch/manifests/init.pp:242 on  
> node [n6.example.com](http://n6.example.com)
> 
> Warning: Not using cache on failed catalog
> 
> # Error: Could not retrieve catalog; skipping run
> 
> How exactly would I pass a hash to this variable so that it will work?
> 
> Thanks so much.  
> Chris
> 
> --  
> You received this message because you are subscribed to the Google  
> Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send  
> an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com)  
> [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/58e5ece8-bb3c-4d0f-92c1-8d950bc4f714%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/58e5ece8-bb3c-4d0f-92c1-8d950bc4f714%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/58e5ece8-bb3c-4d0f-92c1-8d950bc4f714%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/58e5ece8-bb3c-4d0f-92c1-8d950bc4f714%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5356B34F.4080401%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/5356B34F.4080401%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Chris\_Neal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_neal/32/3527_2.png) [@Chris\_Neal](https://discuss.elastic.co/u/Chris_Neal)\
**Post date:** [April 22, 2014, 6:36pm UTC](https://discuss.elastic.co/t/puppet-enterprise-elasticsearch-config-hash/17129/3 "2014-04-22T18:36:51Z")

</div>

Thanks Kelly.

Are you using Puppet Enterprise or the Open Source version? It looks like  
all the examples are for the open source version, which I believe is where  
I'm hitting the snag. Your syntax looks just like mine, but getting Puppet  
Enterprise to accept it as a hash seems to be where the problem lies.

Chris

On Tue, Apr 22, 2014 at 1:22 PM, Kelly Sauke [ksauke@gmail.com](mailto:ksauke@gmail.com) wrote:

> This is what my class looks like using the same elasticsearch module in  
> puppet and it works for me.
> 
> class { 'elasticsearch':  
> package\_url =\>  
> 'puppet:///extra\_files/elasticsearch-1.1.0.noarch.rpm',  
> java\_install =\> true,  
> config =\> {  
> 'cluster' =\> {  
> 'name' =\> 'puppet-test-cluster',  
> },  
> 'node' =\> {  
> 'name' =\> 'puppet-test-node',
> 
> ```
> }
> }
> 
> ```
> 
> }
> 
> On 04/22/2014 11:30 AM, Chris Neal wrote:
> 
> Hi all,
> 
> This is most likely a noob question, so I apologize. I've googled as  
> well and was not able to find an answer to this seeminly basic question.  
> I'm using Puppet Enterprise 3.1.2 along with this module to install/manage  
> Elasticsearch:  
> [elasticsearch/elasticsearch · Module for managing and configuring Elasticsearch nodes · Puppet Forge](https://forge.puppetlabs.com/elasticsearch/elasticsearch/0.2.3)
> 
> I've added the elasticsearch class to my node definition, and when I try  
> and pass the hash to the 'config' variable, my runs fail with various  
> errors about the parameter being a string, not a hash.
> 
> I've tried:
> 
> class { 'elasticsearch':  
> config =\> {  
> 'node' =\> {  
> 'name' =\> 'elasticsearch001'  
> },  
> 'index' =\> {  
> 'number\_of\_replicas' =\> '0',  
> 'number\_of\_shards' =\> '5'  
> },  
> 'network' =\> {  
> 'host' =\> $::ipaddress  
> }  
> }  
> }
> 
> and also:
> 
> config =\> {  
> 'node' =\> {  
> 'name' =\> 'elasticsearch001'  
> },  
> 'index' =\> {  
> 'number\_of\_replicas' =\> '0',  
> 'number\_of\_shards' =\> '5'  
> },  
> 'network' =\> {  
> 'host' =\> $::ipaddress  
> }  
> }
> 
> and also:
> 
> {  
> 'node' =\> {  
> 'name' =\> 'elasticsearch001'  
> },  
> 'index' =\> {  
> 'number\_of\_replicas' =\> '0',  
> 'number\_of\_shards' =\> '5'  
> },  
> 'network' =\> {  
> 'host' =\> $::ipaddress  
> }
> 
> All result in something like this:
> 
> ====================  
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER:  
> " config =\> { 'node' =\> { 'name' =\> 'elasticsearch001' }, 'index' =\> {  
> 'number\_of\_replicas' =\> '0', 'number\_of\_shards' =\> '5' }, 'network' =\> {  
> 'host' =\> $::ipaddress } }" is not a Hash. It looks to be a String at  
> /etc/puppetlabs/puppet/modules/elasticsearch/manifests/init.pp:242 on node  
> [n6.example.com](http://n6.example.com)
> 
> Warning: Not using cache on failed catalog
> 
> # Error: Could not retrieve catalog; skipping run
> 
> How exactly would I pass a hash to this variable so that it will work?
> 
> Thanks so much.  
> Chris
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/58e5ece8-bb3c-4d0f-92c1-8d950bc4f714%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/58e5ece8-bb3c-4d0f-92c1-8d950bc4f714%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/58e5ece8-bb3c-4d0f-92c1-8d950bc4f714%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/58e5ece8-bb3c-4d0f-92c1-8d950bc4f714%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/5356B34F.4080401%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/5356B34F.4080401%40gmail.com)[https://groups.google.com/d/msgid/elasticsearch/5356B34F.4080401%40gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/5356B34F.4080401%40gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAND3DpjSwx11en8m3zUmKuzonmjqg-H4DyNO0EU1mNApDfFH5g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAND3DpjSwx11en8m3zUmKuzonmjqg-H4DyNO0EU1mNApDfFH5g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:34am UTC](https://discuss.elastic.co/t/puppet-enterprise-elasticsearch-config-hash/17129/4 "2017-07-06T01:34:18Z")

</div>


