On Tuesday, October 16, 2018 at 3:54:13 AM UTC-5, comport3 wrote: > > Hi All, > > We are integrating a new PuppetDB role, and note that there are some key > tuning parameters we'd like to modify to optimise the performance, such as > 'shared_buffers' and 'work_mem'. Normally the methods to do this would be a > straight parameter lookup in Hiera, however these values are nested within > a Hash. No problem I hear you say, just use 'create_resources'.. >
Well no, what *I* say is *what* problem? Hiera has no problem whatever providing hashes to Puppet, including for automatic data binding. If the value associated with a given key in your data is a hash, then that's what Hiera provides. That has always worked, and it is more flexible now than ever. > well that's what I'd normally do next, however trying to declare it in a > 'profile' class it complains of a 'duplicate class declaration'... > > Steps to reproduce - > 1. puppet module install puppetlabs-puppetdb > 2. class profile::puppetdb { > include profile::fw::puppetdb > include ::puppetdb > class { 'postgresql::server': > config_hash => { > 'shared_buffers' => '512MB', > 'work_mem' => '16MB', > } > } > } > > If you want the config_hash parameter of class postgresql::server to receive that hash via automated data binding, then you need two things: 1. You need appropriate data. For example: postgresql::server::config_hash: shared_buffers: '512MB' work_mem: '16MB' 2. You need any applicable resource-like declaration of class postgresql::server in the manifest set to not itself bind a value to the config_hash parameter. It's not clear to me why you're shooting straight past that toward more complicated and riskier possibilities. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5ba4ce1a-7116-43f0-b1c5-be73b7d6fd3a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.