On Thu, Apr 05, 2012 at 07:14:10PM +, Nan Liu wrote:
> On Thu, Apr 5, 2012 at 7:06 PM, vicki wrote:
> > Hi,
> > 1) I added this test function tom my
> > /etc/puppet/modules/write_line_to_file/lib/puppet/parser/functions/write_line_to_file.rb
> > :
> >
> > module Puppet::Parser::Functions newfu
On Thu, Apr 5, 2012 at 7:06 PM, vicki wrote:
> Hi,
> 1) I added this test function tom my
> /etc/puppet/modules/write_line_to_file/lib/puppet/parser/functions/write_line_to_file.rb
> :
>
> module Puppet::Parser::Functions newfunction(:write_line_to_file) do |args|
> filename = args[0]
> st
Hi,
1) I added this test function tom my
/etc/puppet/modules/write_line_to_file/lib/puppet/parser/functions/write_line_to_file.rb
:
*module Puppet::Parser::Functions newfunction(:write_line_to_file) do |args|
filename = args[0]
str = args[1]
File.open(args[0], 'a') {|fd| fd.puts str