On Sat, Nov 7, 2009 at 10:12 PM, Douglas Garstang
<doug.garst...@gmail.com>wrote:

>
> Err, well that's not gonna work!
>
> I need to both make sure that the base directory exists AND the
> symlink to it exists. Other than defining a file resource that ensures
> the base directory exists and another file resource to create the
> symlink, how else could this be done?
>
> In fact, they aren't the same resource. One is a file resource called
> "/opt/tomcat/${name}/${software}/tomcat-${version}" and the other is a
> LINK to a file resource called
> "/opt/tomcat/${name}/${software}/tomcat-${version}".
>

you are making a link to a file called
   "/opt/tomcat/${name}/${software}/${tomcat_version}";

under the directory comments you use the name:
   "/opt/tomcat/${name}/${software}/tomcat_${version}";
(which is the same name used for the link)


maybe this is the mistake?



> The error messages are pretty confusing. They point to the symlink
> line and tell me that's where the duplicate definition is, not where
> the other file resource is.
>
>
I agree that its confusing that it shows the same line number for both of
the duplicate references. I can see if there is an issue open.


> Doug.
>
>
>
Here is the code that I think you want


   1.         #
   2.         # Make a symlink for tomcat.
   3.         #
   4.         "/opt/tomcat/${name}/${software}/tomcat-${version}":
   5.             require => Package["apache-tomcat-${name}-${software}"],
   6.             ensure =>
   "/opt/tomcat/${name}/${software}/${tomcat_version}";
   7.
   8.         #
   9.         # Make sure that the base Tomcat directory for this instance
   exists.
   10.         #
   11.         "/opt/tomcat/${name}/${software}/${tomcat_version}":
   12.             require => Package["apache-tomcat-${name}-${software}"],
   13.             owner => tomcat, group => tomcat,
   14.             ensure => directory,

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