Re: [Puppet Users] how can i determinate from one class if another class applied?

2010-10-15 Thread Felix Frank
On 10/15/2010 09:40 AM, walexey wrote:
 Hello everybody!
 How can i determinate from one class if another class applied to the
 this node?
 

You can use the defined() function.

if defined(Class[my_class]) {
 ...
}

YOU SHOULD NOT DO THAT, though. There are problems, because puppet may
include classes in a different order in each run. See the details in
http://docs.puppetlabs.com/references/stable/function.html#defined

If the class you test for belongs to an earlier stage (in 2.6.0+), this
problem may be sidestepped. I'm not sure if that's how that works, though.

HTH,
Felix

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



Re: [Puppet Users] how can i determinate from one class if another class applied?

2010-10-15 Thread Bruce Richardson
On Fri, Oct 15, 2010 at 12:40:57AM -0700, walexey wrote:
 Hello everybody!
 How can i determinate from one class if another class applied to the
 this node?

Use the defined() function.

-- 
Bruce

What would Edward Woodward do?

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