James.

Link: http://pastebin.com/m418fc08a

Currently getting this error from it...

Nov  7 18:13:09 gumby puppetd[13556]: Could not retrieve catalog:
Puppet::Parser::AST::Resource failed with error ArgumentError:
Duplicate definition:
File[/opt/tomcat/tfel0/starterkit/tomcat-current] is already defined
in file /etc/puppe
t/modules/tomcat/manifests/init.pp at line 88; cannot redefine at
/etc/puppet/modules/tomcat/manifests/init.pp:88 on node
gumby.fr.twofish.com

Now, I know you can't define the same resource twice, but as far as I
can tell, I'm not passing the same parameters to the definition, so
the final version of the resource should not be the same.

Doug.


On Sat, Nov 7, 2009 at 4:16 PM, Douglas Garstang
<doug.garst...@gmail.com> wrote:
> I have multiple instances of tomcat running on a single system. They
> are installed to /opt/tomcat/$x/$y/$version.
>
> I wanted to symlink each instance's version back to a tomcat-current
> directory, like this...
>
> /opt/tomcat/$x/$y/tomcat-current -> /opt/tomcat/$x/$y/tomcat-6.0.20-1.tf
>
> So, I had a definition like this...
>
> define tomcat::create_inst($software, $version = "current",
> $server_port, $connector_port) {
>        #
>        # Create a symlink.
>        #
>        "/opt/tomcat/$name/$software/tomcat-current":
>            require => Package["apache-tomcat-$name-$software"],
>            ensure => "/opt/tomcat/$name/$software/$tomcat_version";
> }
>
> which is called from the node definition like this....
>
>   tomcat::create_inst {
>        tfel0:
>            software => "starterkit",
>            server_port => 7119,
>            connector_port => 7118;
>        }
>
> However, puppet complains (but of course!)...
>
> Nov  7 16:15:05 gumby puppetd[17245]: Could not retrieve catalog:
> Puppet::Parser::AST::Resource failed with error ArgumentError:
> Duplicate definition:
> File[/opt/tomcat/tfel0/starterkit/tomcat-current] is already defined
> in file /etc/puppe
> t/modules/tomcat/manifests/init.pp at line 88; cannot redefine at
> /etc/puppet/modules/tomcat/manifests/init.pp:88 on node
> gumby.fr.xxx.com
>
> Why? I'm only calling the definition once! ARRRGGGHHHHH!!!!!!
>
> Doug
>



-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

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