Hi Phillip,

On Mon, Dec 5, 2011 at 4:26 PM, Phillip Frost <ind...@bitglue.com> wrote:

>
> On Dec 5, 2011, at 4:21 PM, Darin Perusich wrote:
>
> > Hello All,
> >
> > I'm working on an ssh module and using a "define" to specify
> "non-standard" sshd_config options via templates. I basically want to add
> additional entries to the AllowGroups, set or unset Subsystem options, etc.
> Whenever I run "puppet  agent --test --noop" against this modules is fails
> with "err: Failed to apply catalog: Could not find dependency
> File[sshd_config] for Service[sshd] at
> /etc/puppet/modules/ssh/manifests/init.pp:42".
> > [...]
> > http://pastebin.com/dGwtEEzB
>
> How are you declaring this ssh::sshd_config resource or the ssh class? I
> suspect you are declaring ssh:sshd_config but not the class, so the sshd
> service and sshd_config file declared therein aren't declared, thus the
> error.
>
>
The ssh class, as posted in the pastebin link, is defined in
/etc/puppet/modules/ssh/manifests/init.pp, and given that the
ssh:sshd_config is defined within said init.pp I didn't think I needed to
do anything else.


> If that's the case, one solution is to add "include ssh" inside
> ssh::ssh_config. This will implicitly declare the ssh class whenever you
> declare a ssh::sshd_config. The other solution (which I'd prefer, because
> explicit is better than implicit) is to declare the ssh class explicitly
> before you declare an ssh:ssh_config, with either:
>
> include ssh
>
> or
>
> class { 'ssh': }
>

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.

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