Ben Beuchler wrote: > I'm fairly certain I encountered the preferred pattern for inheriting > from a class for the specific purpose of disabling it. I can't seem > to find it anymore. Any pointers?
The ones I use are a bit different than AJ's, and don't really use inheritance. Don't know if I saw this elsewhere first, but if a disabling class is supposed to override everything that the enabling class did, then I'm not sure if inheritance does anything for you. Example: class pgicdk { package { [ "pgicdk" ]: ensure => latest, } file { "/etc/bash.bashrc.d/pgicdk.sh": source => "puppet:///pgicdk/pgicdk-$architecture.sh", owner => root, group => root, mode => 0644; } file { "/opt/pgi/license.dat": source => "puppet:///pgicdk/license.dat", owner => root, group => root, require => Package["pgicdk"], mode => 0644; } } class pgicdk::disabled { package { [ "pgicdk" ]: ensure => absent, require => File["/opt/pgi/license.dat"], } file { "/etc/bash.bashrc.d/pgicdk.sh": ensure => absent, } file { "/opt/pgi/license.dat": ensure => absent, } } -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- ren...@tntech.edu --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---