Not really sure about it (pretty new in puppet) but ... what about
parametrized classes? You could define default values for parameters in the
class or overwrite them when using the class.

On Tuesday, March 26, 2013 3:14:51 AM UTC+1, Cesar Covarrubias wrote:

I am trying to create a "template" for all my servers. I have 2
configurations. An NTP client (which is taken care of in the baseclass
class. I want to create an override specific for the NTP servers by
declaring something specific in the node declaration. Something like
"baseclass::ntp:restrict => true,". Or alternatively, how would I change
one of the already declared variable from baseclass::ntp?

Does anyone have any ideas host to do this?

This is what I have so far:


class baseclass {
include defaultusers
include sudoers
include issue

class { ntp:
ensure => running,
servers => ['ntpserver1.host.com',
autoupdate => false,


node default {
include baseclass

node "ntpserver1.host.com" inherits default {
<some code here to declare new variable in baseclass::ntp>
<some code here to change existing variable, such as "ensure">
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 5 | next ›
Discussion Overview
grouppuppet-users @
postedMar 26, '13 at 9:55a
activeMar 27, '13 at 1:04p



site design / logo © 2022 Grokbase