Thank you for the quick reply! This explains the the behavior I see. On Thursday, April 5, 2012 12:06:00 PM UTC-7, 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] > str = args[1] > File.open(args[0], 'a') {|fd| fd.puts str } > end > end* > > 2) I invoked it in the > /etc/puppet/modules/write_line_to_file/manifest/init.pp like this: > > *class write_line_to_file{ > write_line_to_file('/tmp/some_file', "Hello world!") > }* > > 3) And I also included this module into my /etc/puppet/manifests/nodes.pp > under the correct node: > *node default {} > node 'testnode.domain.com' > { > include hosts > include uninstall_screen > include write_line_to_file > }* > * > *The function does execute, but on the puppetmaster - not on the remote > node. Other two functions execute on the correct node. What am I missing? > > Thank you! > Vicki > > On Thursday, April 5, 2012 12:06:00 PM UTC-7, 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] > str = args[1] > File.open(args[0], 'a') {|fd| fd.puts str } > end > end* > > 2) I invoked it in the > /etc/puppet/modules/write_line_to_file/manifest/init.pp like this: > > *class write_line_to_file{ > write_line_to_file('/tmp/some_file', "Hello world!") > }* > > 3) And I also included this module into my /etc/puppet/manifests/nodes.pp > under the correct node: > *node default {} > node 'testnode.domain.com' > { > include hosts > include uninstall_screen > include write_line_to_file > }* > * > *The function does execute, but on the puppetmaster - not on the remote > node. Other two functions execute on the correct node. What am I missing? > > Thank you! > Vicki > > On Thursday, April 5, 2012 12:06:00 PM UTC-7, 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] > str = args[1] > File.open(args[0], 'a') {|fd| fd.puts str } > end > end* > > 2) I invoked it in the > /etc/puppet/modules/write_line_to_file/manifest/init.pp like this: > > *class write_line_to_file{ > write_line_to_file('/tmp/some_file', "Hello world!") > }* > > 3) And I also included this module into my /etc/puppet/manifests/nodes.pp > under the correct node: > *node default {} > node 'testnode.domain.com' > { > include hosts > include uninstall_screen > include write_line_to_file > }* > * > *The function does execute, but on the puppetmaster - not on the remote > node. Other two functions execute on the correct node. What am I missing? > > Thank you! > Vicki > > On Thursday, April 5, 2012 12:06:00 PM UTC-7, 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] > str = args[1] > File.open(args[0], 'a') {|fd| fd.puts str } > end > end* > > 2) I invoked it in the > /etc/puppet/modules/write_line_to_file/manifest/init.pp like this: > > *class write_line_to_file{ > write_line_to_file('/tmp/some_file', "Hello world!") > }* > > 3) And I also included this module into my /etc/puppet/manifests/nodes.pp > under the correct node: > *node default {} > node 'testnode.domain.com' > { > include hosts > include uninstall_screen > include write_line_to_file > }* > * > *The function does execute, but on the puppetmaster - not on the remote > node. Other two functions execute on the correct node. What am I missing? > > Thank you! > Vicki > > On Thursday, April 5, 2012 12:06:00 PM UTC-7, 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] > str = args[1] > File.open(args[0], 'a') {|fd| fd.puts str } > end > end* > > 2) I invoked it in the > /etc/puppet/modules/write_line_to_file/manifest/init.pp like this: > > *class write_line_to_file{ > write_line_to_file('/tmp/some_file', "Hello world!") > }* > > 3) And I also included this module into my /etc/puppet/manifests/nodes.pp > under the correct node: > *node default {} > node 'testnode.domain.com' > { > include hosts > include uninstall_screen > include write_line_to_file > }* > * > *The function does execute, but on the puppetmaster - not on the remote > node. Other two functions execute on the correct node. What am I missing? > > Thank you! > Vicki > > On Thursday, April 5, 2012 12:06:00 PM UTC-7, 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] > str = args[1] > File.open(args[0], 'a') {|fd| fd.puts str } > end > end* > > 2) I invoked it in the > /etc/puppet/modules/write_line_to_file/manifest/init.pp like this: > > *class write_line_to_file{ > write_line_to_file('/tmp/some_file', "Hello world!") > }* > > 3) And I also included this module into my /etc/puppet/manifests/nodes.pp > under the correct node: > *node default {} > node 'testnode.domain.com' > { > include hosts > include uninstall_screen > include write_line_to_file > }* > * > *The function does execute, but on the puppetmaster - not on the remote > node. Other two functions execute on the correct node. What am I missing? > > Thank you! > Vicki > > On Thursday, April 5, 2012 12:06:00 PM UTC-7, 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] > str = args[1] > File.open(args[0], 'a') {|fd| fd.puts str } > end > end* > > 2) I invoked it in the > /etc/puppet/modules/write_line_to_file/manifest/init.pp like this: > > *class write_line_to_file{ > write_line_to_file('/tmp/some_file', "Hello world!") > }* > > 3) And I also included this module into my /etc/puppet/manifests/nodes.pp > under the correct node: > *node default {} > node 'testnode.domain.com' > { > include hosts > include uninstall_screen > include write_line_to_file > }* > * > *The function does execute, but on the puppetmaster - not on the remote > node. Other two functions execute on the correct node. What am I missing? > > Thank you! > Vicki > > On Thursday, April 5, 2012 12:06:00 PM UTC-7, 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] > str = args[1] > File.open(args[0], 'a') {|fd| fd.puts str } > end > end* > > 2) I invoked it in the > /etc/puppet/modules/write_line_to_file/manifest/init.pp like this: > > *class write_line_to_file{ > write_line_to_file('/tmp/some_file', "Hello world!") > }* > > 3) And I also included this module into my /etc/puppet/manifests/nodes.pp > under the correct node: > *node default {} > node 'testnode.domain.com' > { > include hosts > include uninstall_screen > include write_line_to_file > }* > * > *The function does execute, but on the puppetmaster - not on the remote > node. Other two functions execute on the correct node. What am I missing? > > Thank you! > Vicki > >
-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/QIaIYgvZ3WsJ. 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.