Hi all, I''m working on some client/server manifest and I wonder : In the example below: class exporter { @@file { "/var/lib/puppet/nodes/$fqdn": content => "$ipaddress\n", tag => "ip" } } node "export1.daysofwonder.com" { include exporter } node "export2.daysofwonder.com" { include exporter } node "collector.daysofwonder.com" { File <<| tag == "ip" |>> } currently ... when removing class from node export1.daysofwonder.com the file describing this host ip will still remain on the collector machine. Is there any nice way to remove the file when the class is removed from the node ? 10x in advance Moty --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi> currently ... when removing class from node export1.daysofwonder.com > the file describing this host ip will still remain on the collector > machine. > > Is there any nice way to remove the file when the class is removed > from the node ?not yet, but afair brice hacked something up for 0.25, but I''m currently not able to find the feature ticket ... cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Thu, 2009-08-20 at 15:06 +0200, Peter Meier wrote:> Hi > > > currently ... when removing class from node export1.daysofwonder.com > > the file describing this host ip will still remain on the collector > > machine. > > > > Is there any nice way to remove the file when the class is removed > > from the node ? > > not yet, but afair brice hacked something up for 0.25, but I''m currently > not able to find the feature ticket ...I did a puppetclean that was more or less doing something like this, but it wasn''t really accepted (or there wasn''t any consensus), because at that time it was considered not good to have a new puppetSomething application without refactoring the applications under a same name (ie ala git, see tickets #2479). Basically, I still have the ticket assigned (#1886), and I''m waiting for this refactoring in the Application Controler (which I will eventually do later) to appear, before pushing puppet clean one more time. The brave sould interested in the code can see/use it at: http://github.com/masterzen/puppet/tree/tickets/1886 -- Brice Figureau Visit Planet Puppet, only pure Puppet Blog posts: http://www.planetpuppet.org/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
10x .. I plan to create manifests for various client/server services and it will be nice to add that feature for that ..... Moty On Thu, Aug 20, 2009 at 5:53 PM, Brice Figureau < brice-puppet@daysofwonder.com> wrote:> > On Thu, 2009-08-20 at 15:06 +0200, Peter Meier wrote: > > Hi > > > > > currently ... when removing class from node export1.daysofwonder.com > > > the file describing this host ip will still remain on the collector > > > machine. > > > > > > Is there any nice way to remove the file when the class is removed > > > from the node ? > > > > not yet, but afair brice hacked something up for 0.25, but I''m currently > > not able to find the feature ticket ... > > I did a puppetclean that was more or less doing something like this, but > it wasn''t really accepted (or there wasn''t any consensus), because at > that time it was considered not good to have a new puppetSomething > application without refactoring the applications under a same name (ie > ala git, see tickets #2479). > > Basically, I still have the ticket assigned (#1886), and I''m waiting for > this refactoring in the Application Controler (which I will eventually > do later) to appear, before pushing puppet clean one more time. > > The brave sould interested in the code can see/use it at: > http://github.com/masterzen/puppet/tree/tickets/1886 > -- > Brice Figureau > Visit Planet Puppet, only pure Puppet Blog posts: > http://www.planetpuppet.org/ > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Something off my mind as a workaround for the moment (not sure it works): - add a file rule on the collector to clean the folder in question of old file say 1 day, 1 week. etc - add a require on the exported file resources to the above rule The disadvantage of this is that (if it works that is) the files will get recreated at the specified interval, and will have a log of the specified time. Hope this isn''t one of my brainfarts. Silviu Moty wrote:> 10x .. > > I plan to create manifests for various client/server services and it > will be nice to add that feature for that ..... > > > Moty > > On Thu, Aug 20, 2009 at 5:53 PM, Brice Figureau > <brice-puppet@daysofwonder.com <mailto:brice-puppet@daysofwonder.com>> > wrote: > > > On Thu, 2009-08-20 at 15:06 +0200, Peter Meier wrote: > > Hi > > > > > currently ... when removing class from node > export1.daysofwonder.com <http://export1.daysofwonder.com> > > > the file describing this host ip will still remain on the > collector > > > machine. > > > > > > Is there any nice way to remove the file when the class is removed > > > from the node ? > > > > not yet, but afair brice hacked something up for 0.25, but I''m > currently > > not able to find the feature ticket ... > > I did a puppetclean that was more or less doing something like > this, but > it wasn''t really accepted (or there wasn''t any consensus), because at > that time it was considered not good to have a new puppetSomething > application without refactoring the applications under a same name (ie > ala git, see tickets #2479). > > Basically, I still have the ticket assigned (#1886), and I''m > waiting for > this refactoring in the Application Controler (which I will eventually > do later) to appear, before pushing puppet clean one more time. > > The brave sould interested in the code can see/use it at: > http://github.com/masterzen/puppet/tree/tickets/1886 > -- > Brice Figureau > Visit Planet Puppet, only pure Puppet Blog posts: > http://www.planetpuppet.org/ > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
10x for the advice ... I did not had the time to check it but I thoughton something like this: on the exported file rule I''ll set: ensure => $SomeVariable and set this parameter on the node level.... I''m not sure it will work it also can be one of my brainfarts.. Next week I''ll test it all.... Moty On Fri, Aug 21, 2009 at 6:25 PM, Silviu Paragina <silviu@paragina.ro> wrote:> > Something off my mind as a workaround for the moment (not sure it works): > - add a file rule on the collector to clean the folder in question of > old file say 1 day, 1 week. etc > - add a require on the exported file resources to the above rule > > The disadvantage of this is that (if it works that is) the files will > get recreated at the specified interval, and will have a log of the > specified time. > > Hope this isn''t one of my brainfarts. > > Silviu > > Moty wrote: > > 10x .. > > > > I plan to create manifests for various client/server services and it > > will be nice to add that feature for that ..... > > > > > > Moty > > > > On Thu, Aug 20, 2009 at 5:53 PM, Brice Figureau > > <brice-puppet@daysofwonder.com <mailto:brice-puppet@daysofwonder.com>> > > wrote: > > > > > > On Thu, 2009-08-20 at 15:06 +0200, Peter Meier wrote: > > > Hi > > > > > > > currently ... when removing class from node > > export1.daysofwonder.com <http://export1.daysofwonder.com> > > > > the file describing this host ip will still remain on the > > collector > > > > machine. > > > > > > > > Is there any nice way to remove the file when the class is > removed > > > > from the node ? > > > > > > not yet, but afair brice hacked something up for 0.25, but I''m > > currently > > > not able to find the feature ticket ... > > > > I did a puppetclean that was more or less doing something like > > this, but > > it wasn''t really accepted (or there wasn''t any consensus), because at > > that time it was considered not good to have a new puppetSomething > > application without refactoring the applications under a same name > (ie > > ala git, see tickets #2479). > > > > Basically, I still have the ticket assigned (#1886), and I''m > > waiting for > > this refactoring in the Application Controler (which I will > eventually > > do later) to appear, before pushing puppet clean one more time. > > > > The brave sould interested in the code can see/use it at: > > http://github.com/masterzen/puppet/tree/tickets/1886 > > -- > > Brice Figureau > > Visit Planet Puppet, only pure Puppet Blog posts: > > http://www.planetpuppet.org/ > > > > > > > > > > > > > > > > > >-- Moty --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---