On Fri, Mar 23, 2012 at 11:10, Paul Tötterman <paul.totter...@gmail.com>wrote:
> Hi John > > >> I can see where 'file_line' will add a line but I don't know enough ruby >> to know, will it remove a line that does exist? >> > > 'ensurable' sounds like it can manage both 'ensure => present' and 'ensure > => absent'. And sure enough, if you look into the provider: > https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/provider/file_line/ruby.rb > there > is code for removing the line as well. > > I would also recommend that you take a look at the awesome concat module: > https://github.com/ripienaar/puppet-concat if you cannot manage the whole > file easily using templates. > > Cheers, > Paul > > > Thanks Paul. I will also look at the concat module. One (hopefully) last question...How do I take the file_line.rb file and put it so puppet recognises it? Do I do that with a define or can I just take the file and place it somewhere for it to work? I am pretty new to puppet and still working on the basics. John -- 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.