On 9/19/12 10:43 PM, Gonzalo Servat wrote: > On Thu, Sep 20, 2012 at 3:37 PM, Garrett Honeycutt > <garr...@puppetlabs.com <mailto:garr...@puppetlabs.com>> wrote: > > No need at all to use a different puppet master, you could just use > environments[1]. When you want to test a system again a different > environment, staging in this example, you can run `puppet agent -t > --environment=staging`. > > > Yep, I need to move towards this. I guess this means I need to go > through all my templates and put hiera variables for everything. > > > Hiera[2] is meant to solve this. You might have staging.yaml and > production.yaml that specify values for mysql_innodb_buffer_pool_size. > > In your code you could have > > $innodb_buffer_pool_size = hiera('mysql_innodb_buffer_pool_size') > > and then use <%= innodb_buffer_pool_size %> in a template for your > my.cnf. > > > Can one call hiera() from within the ERB templates? > > - Gonzalo
No, you call it from the manifests. Recommend reading the hiera documentation. Also you can see an example with my dnsclient module[1]. [1] - https://github.com/ghoneycutt/puppet-dnsclient/tree/new_design_pattern_with_hiera -g -- Garrett Honeycutt 206.414.8658 http://puppetlabs.com -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.