Currently, if I want to remove resources from a node that I've previously configured, I'm doing 'anti' patterns. Is there away for puppet to do it for me? For example, if I started with:
define website () { file { "/etc/apache2/sites-enabled/$name.conf": content => template("website/apache2.conf.erb") } } node 'oldwebserver' { package { apache2: ensure => installed, } website { "www.example.com": } } And then I wanted to get ride of that website from that specific node: define website::anti () { file { "/etc/apache2/sites-enabled/$name.conf": ensure => absent } } node 'oldwebserver' { package { apache2: ensure => absent, } website::anti { "www.example.com": } } But can puppet make this easier for me? What I'd like to do instead is: node 'oldwebserver' { } At the moment puppet doesn't behave in that manner, it simply leaves the Package and File resources in their last configured state, and forgets about them. So I was wondering if it is possible for a storeconfigs database to store some history of configs? If it is possible (or if it's possible to build that feature in), is it possible with that history to determine when a resource changes from existing in the manifest, to not existing in the manifest? If that is possible (or could be built in), could you make puppet automatically remove that resource from the client system if it detects a resource has been removed? -- +-Geoff Crompton +--Debian System Administrator +---Trinity College --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---