Hi everybody!

I would like to share a group of variables between definitions and I don't
know what it is the best approach to do this...

First, let me explain the situation...

I were using  a class and defining those variables inside of it.. then I
used inheritance to this class to
get the variables instantiated.

For instance:

class common_variables {
   $a_var = "hello world"
}

class class_a inherits common_variables {
    notice($a_var)
}

class class_b inherits common_variables {
    notice($a_var)
}

The problem, is since class are singletons, I can't do that in a situation
where need to have
multiple instances of class_a and class_b on in a host. So, I am trying to
implement the
same logic using definitions, but after reading the language tutorial at
puppet's official
wiki, I still haven't found a nice way to do.

One solution would be to put the definition of
$a_var inside boths defines, but I didn't like to do that. Has anyone
experienced a problem
like this? what would it be the best approach and the "right" way to do it?

Thanks in advance,
Gus

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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