Hi all, I need a Puppet type that act like this : class1 { mytype { "name: command => "command = YY" } } class2 { mytype { "name": command => "command = XX", } } On the client, it generate a file : myfile.cfg ------------- command = YY command = XX I want to purge "myfile.cfg" at each run ( I don''t want to use someting like ensure => absent to remove old stuff) I tried erb files but it doesn''t fit my needs. Here are my questions : Is it possible :) ? Is there a builtin type to do these ? Do I have to make a type and a provider ? How can I purge myfile.cfg only once when puppet run on the client ? Thanks for your help ! -- Florent PAILLOT -- 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, On 05/17/2011 11:19 AM, Florent Paillot wrote:> Hi all, > > I need a Puppet type that act like this : > > class1 { > > mytype { "name: > command => "command = YY" > } > } > > class2 { > > mytype { "name": > command => "command = XX", > } > } > > > On the client, it generate a file : > > myfile.cfg > ------------- > > command = YY > command = XXThis module could be of interest to you: https://github.com/ripienaar/puppet-concat Cheers, Felix -- 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.
Thank you for your answer Felix ! I took a look at the puppet-concat module. I should be able to achieve my goal with it but it''s not cool (IMO) to use an external bash script :/ . A type is a better solution, don''t you think ? Florent.> Hi, > > On 05/17/2011 11:19 AM, Florent Paillot wrote: >> Hi all, >> >> I need a Puppet type that act like this : >> >> class1 { >> >> mytype { "name: >> command => "command = YY" >> } >> } >> >> class2 { >> >> mytype { "name": >> command => "command = XX", >> } >> } >> >> >> On the client, it generate a file : >> >> myfile.cfg >> ------------- >> >> command = YY >> command = XX > This module could be of interest to you: > https://github.com/ripienaar/puppet-concat > > Cheers, > Felix >-- Florent PAILLOT Service des Moyens Informatiques INRIA Bordeaux -Sud-Ouest 05.24.57.41.25 -- 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 05/17/2011 03:45 PM, Florent Paillot wrote:> it''s not cool (IMO) to use an external bash scriptI sort of agree and have so far been able to meet all my ends without relying on concat. The bigger problem I perceive is that the number of file resources can explode and the agent calls the fileserver a lot. I try and use some manifest voodoo in select places to achieve server side concatenation. Cheers, Felix -- 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.