Hi,

I am learning puppet using version 2.7.18 on a fresh ubuntu install.

I am trying to test this module 
https://github.com/liamjbennett/puppet-sabnzbd/blob/master/manifests/init.ppbut 
I'm having trouble with the 
if defined(Class['supervisor::service']) section in that it doesn't get run 
even though the supervisor module is installed.

If i put "else{ notice("supervisor not defined?") }" on the end then I see 
that notice msg in the 'puppet apply --debug' output.

This supervisor module is downloaded/installed OK from Puppet Forge and if 
I either 

a) comment out the 'if defined' then it works as expected 
b) *change the if *defined(Class['supervisor::service']) to read if defined(
'supervisor::service') then it also works as expected.

As you can see there is an "include supervisor" at top of the class which 
I'm guessing isn't being called in the 
order needed for the 'if defined' to work and the one without the Class[ ] 
must work because puppet auto loads the modules from the modulepath
and checks if that namespace and module exist?

This is all new to me so i could be very wrong but can anyone explain given 
that init.pp why the 'if defined' isn't working and what is the best
way to achieve what the 'if defined' is there for and that's to see if the 
supervisor module is installed/loaded before entering the if statement and 
using the module?

Many thanks for reading
fLo



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to