On Mon, Feb 27, 2012 at 6:56 AM, Smith <gilles6...@gmail.com> wrote: > Hi all, > > I'll use puppet to manage +/- 10 servers, but I'm facing some problems > about facter variables, dashboard and parameters. > > I try to use this module : > > http://projects.puppetlabs.com/projects/1/wiki/Resolv_Conf_Patterns
That example is out of date in terms of best practices, modules should be written without requiring import function. > class resolver { > # noop > } > > define resolv_conf($domainname = "$domain", $searchpath, $nameservers) > { > file { "/etc/resolv.conf": > owner => root, > group => root, > mode => 644, > content => template("resolver/resolv.conf.erb"), > } > } There's no reason for the configuration to be a define since there's one specific file /etc/resolv.conf. The parameter should be part of the class and looked up from top scope which will allow you to specify the class and parameter in dashboard. This is probably a better starting point: https://github.com/saz/puppet-resolv_conf, and you'll need to either change the module to accept parameters from top scope or write a wrapper class that passes the parameter from dashboard. Thanks, Nan -- 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.