We have a similar setup. The way we do this is to simply enforce as a procedure to create a group and each class we declared, then we would reference the class in that group, and create variables under that group. >From dashboard's organization standpoint we would only assign nodes to a group (instead of class)
Note that variables create from dashboard are global as far as I know, so we would just use naming convention to make things easier. --KL On 2/29/12 5:37 AM, "Smith" <gilles6...@gmail.com> wrote: >Hello, > >Thanks for the info ! >But what I'm trying to do is to pass parameters from the dashboard to >the class. > >For example the following : > >class ntp ($ntp_servers) { >... >} > >Add this class to dashboard, in a group called "Global" and set in >this group a parameter key = ntp_servers with value = some.ntp.server > >Maybe this is here that I'm wrong, here is my site.pp > >cat /etc/puppet/manifests/site.pp >node default { >} > >All classes and nodes are managed through the dashboard. > >Thanks, > >G. > > > > >On Feb 27, 6:50 pm, Nan Liu <n...@puppetlabs.com> wrote: >> 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. > This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. -- 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.