Hi all,

I think I'm not understanding something... 

from http://docs.puppetlabs.com/guides/parameterized_classes.html :

"The parameters you name can be used as normal local variables
throughout the class definition"

so, I have a class like:

class common::nrpe($ensure='absent') {
[...]

if ($::kernel=='Linux') and ($::lsbmajdistrelease=='6') {
        $ensure='present'
}

so, by default the class is dissabled, but if it's a Linux release 6,
the value must be present.

so, I define the class in a Linux release 6 like:

nodes 'test' {
        class { 'common::nrpe' : } 
}


pupet fails with error:

Cannot reassign variable ensure

So, what am I missunderstanding? What is the correct way for doing what
I'm trying?


TIA,
Arnau

-- 
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.

Reply via email to