On Dec 6, 7:59 am, Darin Perusich <da...@darins.net> wrote:
> I have tried this by placing the 'define sshd_config' into a separate file,
> /etc/puppet/modules/ssh/manifests/sshd_config.pp, and using "include ssh".
> I prefer this method but I get the same error. I've merged the define back
> into init.pp thinking I wouldn't need to explicitly declare the ssh class
> within ssh::sshd_config because of it's inclusion.- Hide quoted text -


In the first place, your definition is a bit screwey in that it cannot
be instantiated more than once (you would get a duplicate resource
error on File['sshd_config']).  A definition creates a resource *type*
but you're using it as if it created a single resource.

And that leads directly to the crux of your problem: at the point
where your service resource is parsed, no instance of the definition
can yet have been created, and therefore File['sshd_config'] cannot
yet have been declared.  The service cannot declare a dependency on an
undeclared resource.

Since you would prefer to put the definition in its own file anyway, I
recommend you do so.  Then, add "include 'ssh'" at the beginning of
its body and re-enable the 'notify' parameter in the file resource.
Remove the 'subscribe' from the service resource, but add "require =>
Package['ssh']".  Then you should be good to go.


John

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