Hi, I am trying to work out a way of configuring a service in a parent class, and then not having it used by a class that inherits it? For example if I have a class for Samba which among other things defines the service samba and has standard parameters of ensure => running, hasstatus => true, hasrestart => true, etc. I now want to have another class Samba::cluster which inherits the Samba class. However with a Samba::cluster i need to make sure that /etc/init.d/smb doesn''t get used at all, as this will be controlled by the Red Hat Cluster suite. Any ideas? Thanks for assistance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Just override the parent parameters. undef unsets values. class samba::cluster inherits samba { Service["smb"]: enable => false, ensure => undef, } } -Eric On Thu, 30 Jul 2009, josbal wrote:> > Hi, > > I am trying to work out a way of configuring a service in a parent > class, and then not having it used by a class that inherits it? > > For example if I have a class for Samba which among other things > defines the service samba and has standard parameters of ensure => > running, hasstatus => true, hasrestart => true, etc. I now want to > have another class Samba::cluster which inherits the Samba class. > However with a Samba::cluster i need to make sure that /etc/init.d/smb > doesn''t get used at all, as this will be controlled by the Red Hat > Cluster suite. > > Any ideas? > > Thanks for assistance. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks Eric, This has worked for me... cheers On Jul 31, 10:29 am, Eric Heydrick <eric...@speakeasy.net> wrote:> Just override the parent parameters. undef unsets values. > > class samba::cluster inherits samba { > > Service["smb"]: > enable => false, > ensure => undef, > } > > } > > -Eric > > On Thu, 30 Jul 2009, josbal wrote: > > > Hi, > > > I am trying to work out a way of configuring a service in a parent > > class, and then not having it used by a class that inherits it? > > > For example if I have a class for Samba which among other things > > defines the service samba and has standard parameters of ensure => > > running, hasstatus => true, hasrestart => true, etc. I now want to > > have another class Samba::cluster which inherits the Samba class. > > However with a Samba::cluster i need to make sure that /etc/init.d/smb > > doesn''t get used at all, as this will be controlled by the Red Hat > > Cluster suite. > > > Any ideas? > > > Thanks for assistance.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---