On Feb 16, 11:50 am, Matthew Pounsett <m...@conundrum.com> wrote:
> On 2011/02/16, at 03:44, Felix Frank wrote:
[...]
> I tried that as well (noted in the original post).  That's what generated the 
> error that I included.
>
> Feb 11 17:18:40 puppet-bsd2 puppet-agent[68963]: Could not run Puppet 
> configuration client: Could not find dependency File[/opt/home/2/dev/] for 
> Exec[create-device-/opt/home/2/dev/null] at 
> /usr/local/etc/puppet/production/modules/devices/manifests/init.pp:12
>
> It seems that the problem is that Puppet is expanding the variable in the 
> 'require' but has not yet expanded the variable in the file{} block, and so 
> can't find the file resource to create the dependency tree.
>
> > Although why your original approach didn't work is not quite fathomable
> > to me. If the error persistes, try and make a simplified version of your
> > manifests that reproduces the same problem. Often, this will make a
> > mistake obvious (when it stops to reproduce after all).
>
> This is exactly what I posted.  It's my actual manifests stripped down to 
> just the basics required to demonstrate the problem.

Looking at your manifest more closely, I see that the File resources
you are managing are named without a trailing slash, for example
"$homedir/${service_num}/dev", but the directory parameters you are
passing to your define are specified *with* a trailing slash, i.e.
"$homedir/${service_num}/dev/".  The error message shows that the
missing resource is File[/opt/home/2/dev/] (with a trailing slash),
which indeed you have not declared.  Although the two forms are
generally handed equivalently by the shell, I can fully believe that
Puppet does not consider it safe to treat them equivalently.

Try removing the trailing slashes from your directory names.  I think
that will solve your problem.


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