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 <ksa...@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:
> 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
>
> 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+unsubscr...@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?utm_medium=email&utm_source=footer>
> .
> For more options, visit 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+unsubscr...@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?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAND3DpjSwx11en8m3zUmKuzonmjqg-H4DyNO0EU1mNApDfFH5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to