bmort
2010-Jul-23 19:55 UTC
[Puppet Users] Design, syntax question for passing values from node.pp
Is it possible to define variable at this level. I need to pass the monit config file name ( sometimes its monitrc sometimes in not ). Here is what I have. # /etc/puppet/manifests/nodes.pp node basenode { include postgresql include monit include wiki include apace } node ''freebeerontuesdays.com'' inherits basenode { } -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Peter Berghold
2010-Jul-23 20:10 UTC
Re: [Puppet Users] Design, syntax question for passing values from node.pp
First question that comes to mind: is there a fact for a given node that determines what file name to use? On Jul 23, 2010 3:55 PM, "bmort" <propertywholesaler@gmail.com> wrote: Is it possible to define variable at this level. I need to pass the monit config file name ( sometimes its monitrc sometimes in not ). Here is what I have. # /etc/puppet/manifests/nodes.pp node basenode { include postgresql include monit include wiki include apace } node ''freebeerontuesdays.com'' inherits basenode { } -- 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> . For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Richard Crowley
2010-Jul-23 21:17 UTC
Re: [Puppet Users] Design, syntax question for passing values from node.pp
On Fri, Jul 23, 2010 at 1:10 PM, Peter Berghold <salty.cowdawg@gmail.com> wrote:> First question that comes to mind: is there a fact for a given node that > determines what file name to use?This sounds like a job for an external node classifier that picks a set of classes to apply to the node. http://docs.reductivelabs.com/guides/external_nodes.html -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
John Lyman
2010-Jul-24 14:34 UTC
[Puppet Users] Re: Design, syntax question for passing values from node.pp
You can pass the file name as a variable as long as you assign a value to the variable before you include the class. For example: class basenode { include postgresql include monit include wiki include apace } node ''freebeerontuesdays.com'' { $monit_config = "/etc/monit/monitrc" include basenode } On Jul 23, 5:17 pm, Richard Crowley <r...@rcrowley.org> wrote:> On Fri, Jul 23, 2010 at 1:10 PM, Peter Berghold <salty.cowd...@gmail.com> wrote: > > First question that comes to mind: is there a fact for a given node that > > determines what file name to use? > > This sounds like a job for an external node classifier that picks a > set of classes to apply to the node. > > http://docs.reductivelabs.com/guides/external_nodes.html-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.