Hi John,
On Wed, Dec 7, 2011 at 4:58 PM, jcbollinger <john.bollin...@stjude.org>wrote: > > 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. > > This is my first attempt at setting up a dynamic template so i'm not surprised it's screwy. It's loosely based on similar modules I've seen online and what I've gathered from read the documentation. Basically what i want is to specify a 'default' sshd_config, based on the template, with the ability to change things like AllowGroups/User, sftp-server options, etc. > 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. > > I'll give these changes a try and let you know how things turn out. Thanks! -- 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.