So I''m not sure how to handle this particular case and am wonder how other people have done it. Say I have a class that gets set for all of my clients, in that class I define the default setup for sendmail (nullclient) class sendmail::nullclient { service { "sendmail": ensure => running, enable => true, ... } } now it another class I need to make sure that sendmail isn''t running (maybe it''s a postfix mta) if I define the sendmail service again I get a resource clash. What''s the right way (or any way at this point) to enable a particular resource in 90% of cases and then disable it in a few. I don''t want to have to explicitly define the sendmail::nullclient class for all the hosts C -- stickm@gmail.com -==< Stick >==- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 29 January 2008, Chris MacLeod wrote:> So I''m not sure how to handle this particular case and am wonder how other > people have done it. > Say I have a class that gets set for all of my clients, in that class I > define the default setup for sendmail (nullclient) > > class sendmail::nullclient { > service { "sendmail": > ensure => running, > enable => true, > ... > } > } > > now it another class I need to make sure that sendmail isn''t running (maybe > it''s a postfix mta) > if I define the sendmail service again I get a resource clash. > > What''s the right way (or any way at this point) to enable a particular > resource in 90% of cases and then disable it in a few.Inheritance: class sendmail::disabled inherits sendmail::nullclient { Service[sendmail] { ensure => stopped, enable => false } } Regards, DavidS - -- The primary freedom of open source is not the freedom from cost, but the free- dom to shape software to do what you want. This freedom is /never/ exercised without cost, but is available /at all/ only by accepting the very different costs associated with open source, costs not in money, but in time and effort. - -- http://www.schierer.org/~luke/log/20070710-1129/on-forks-and-forking -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHn4K9/Pp1N6Uzh0URAlpZAJ4mXoSa6Flv/p9rrkoneOH7SjLa2wCgme7N QqyIuwOYBqdHnmfMEP6GuNg=FwDY -----END PGP SIGNATURE-----
On 1/29/08, David Schmitt <david@schmitt.edv-bus.at> wrote:> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tuesday 29 January 2008, Chris MacLeod wrote: > > So I''m not sure how to handle this particular case and am wonder how > other > > people have done it. > > Say I have a class that gets set for all of my clients, in that class I > > define the default setup for sendmail (nullclient) > > > > class sendmail::nullclient { > > service { "sendmail": > > ensure => running, > > enable => true, > > ... > > } > > } > > > > now it another class I need to make sure that sendmail isn''t running > (maybe > > it''s a postfix mta) > > if I define the sendmail service again I get a resource clash. > > > > What''s the right way (or any way at this point) to enable a particular > > resource in 90% of cases and then disable it in a few. > > Inheritance: > > class sendmail::disabled inherits sendmail::nullclient { > Service[sendmail] { ensure => stopped, enable => false } > } > >hmm so I need to make a class in the negative I guess I can call that from a postfix class or whatever as necessary. Seems kinda clunky though -- stickm@gmail.com -==< Stick >==- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users