First off, I'm a ruby noob and I'm in a bit over my head, please be gentile.
I'm getting an exception on line 14 of this file, (written by someone else).
https://github.com/theforeman/kafo/blob/master/modules/kafo_configure/manifests/yaml_to_class.pp
if is_hash($kafo_configure::params[$name]) { # The quotes around $classname seem to matter to puppet's parser... $params = { "${classname}" => $kafo_configure::params[$name] } create_resources( 'class', $params ) I need to adding a debugging to determine why the 'create_resources' function call is crashing.
exception object expected at /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems\ /kafo-0.6.0/modules/kafo_configure/manifests/yaml_to_class.pp:14 on node foo.bar When I try and print out the value of $name, I encounter an error that 'puts' is an unknown function.
if is_hash($kafo_configure::params[$name]) { puts "debugging name is #{name}" # The quotes around $classname seem to matter to puppet's parser... $params = { "${classname}" => $kafo_configure::params[$name] } create_resources( 'class', $params ) I've also tried the following syntaxes:
puts "debugging name is #{name}" print "debugging name is #{name}" puts "debugging name is $name" print "debugging name is $name" puts "debugging name is #{$name}" Can anyone explain:
1. Why this function is unable to print/put ?
2. Is there another way to show what the value of that $name variable is?
Update
As pointed out, I've also used this syntax puts "debugging name is #{$name}"
$foo = inline_template("<%= puts 'foo' %>"). I don't remember what log file this would write to though.