Use heira. Heira can load a config file based on the environment. Setting this up is as simple as creating a hiera definition such as...
(environment).yaml ... And then creating the following files: production.yaml and staging.yaml that contain your environment specific configs. Install the puppet-hiera gem, then you can lookup the appropriate command inside puppet using heira_lookup(param_name). For an example, checkout the vagrant-hiera project on github. If your unfamiliar with vagrant, you'll need to install that to run the example. It's a great tool for doing local puppet testing. Even if you don't want to install vagrant, looking at the source of that project will show you a quick example of how to use hiera. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/YlJx3dHegBsJ. 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.