This seems like a bug to me. In the example below, puppet complains: Nov 7 15:32:28 gumby puppetd[17245]: Configuration could not be instantiated: Could not find dependency File[/opt/jboss/jboss-current/conf/tfel-bindings.xml] for Service[jboss-tfel2] at /etc/puppet/modules/jboss/manifests/init.pp:31; using cached catalog If I replace the File definition in the jboss class from "/opt/jboss/jboss-$jboss_version/conf/tfel-bindings.xml" to "/opt/jboss/jboss-$version/conf/tfel-bindings.xml", then puppet does NOT complain about it. It appears that puppet is treating the two resources differently, even though they both extrapolate to the same thing, ie it treats them literally, without regard to what the value of the variable is. Is this by design? It''s painful, because I wanted to set $jboss_version in the node, pass it to the definition, and use $version inside the definition. I can''t do that. I have to use the $jboss_version variable. Doug define jboss::create_inst($version = "current", $naming_port, $cluster) { service { "jboss-$name": require => [ Package["jboss-server"], Package["jboss-server-$name"], File["/opt/jboss/jboss-$version/conf/tfel-bindings.xml"] ], ensure => running, enable => true, hasrestart => true, hasstatus => true } } class jboss::server { "/opt/jboss/jboss-$jboss_version/conf/tfel-bindings.xml": source => "puppet://$server/jboss/conf/tfel-bindings.xml", require => Package["jboss-server"], owner => root, group => root; } node ''gumby.fr.xxx.com'' { $jboss_version = "4.2.3.GA-1.tf" jboss::create_inst { tfel0: cluster => "c0tfel0", naming_port => "1099"; } } --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
> It''s painful, because I wanted to set $jboss_version in the node, pass > it to the definition, and use $version inside the definition. I can''t > do that. I have to use the $jboss_version variable.use ${jboss_version} instead of $jboss_version. http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#quoting cheers pete --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Peter, Same error... Nov 7 16:06:57 gumby puppetd[17245]: Configuration could not be instantiated: Could not find dependency File[/opt/jboss/jboss-current/conf/tfel-bindings.xml] for Service[jboss-tfel2] at /etc/puppet/modules/jboss/manifests/init.pp:38; usi ng cached catalog after changing the require to... File["/opt/jboss/jboss-${version}/conf/tfel-bindings.xml"] ], Doug. On Sat, Nov 7, 2009 at 3:54 PM, Peter Meier <peter.meier@immerda.ch> wrote:> >> It''s painful, because I wanted to set $jboss_version in the node, pass >> it to the definition, and use $version inside the definition. I can''t >> do that. I have to use the $jboss_version variable. > > > use ${jboss_version} instead of $jboss_version. > > http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#quoting > > cheers pete > > > >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Oh, and I don''t want to use $jboss_version. I want to use $version. That was the whole point. On Sat, Nov 7, 2009 at 4:07 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> Peter, > > Same error... > > Nov 7 16:06:57 gumby puppetd[17245]: Configuration could not be > instantiated: Could not find dependency > File[/opt/jboss/jboss-current/conf/tfel-bindings.xml] for > Service[jboss-tfel2] at > /etc/puppet/modules/jboss/manifests/init.pp:38; usi > ng cached catalog > > after changing the require to... > > File["/opt/jboss/jboss-${version}/conf/tfel-bindings.xml"] ], > > Doug. > > > On Sat, Nov 7, 2009 at 3:54 PM, Peter Meier <peter.meier@immerda.ch> wrote: >> >>> It''s painful, because I wanted to set $jboss_version in the node, pass >>> it to the definition, and use $version inside the definition. I can''t >>> do that. I have to use the $jboss_version variable. >> >> >> use ${jboss_version} instead of $jboss_version. >> >> http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#quoting >> >> cheers pete >> >> >> >> > > > > -- > Regards, > > Douglas Garstang > http://www.linkedin.com/in/garstang > Email: doug.garstang@gmail.com > Cell: +1-805-340-5627 >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Douglas, Douglas Garstang wrote:> Could not find dependency > File[/opt/jboss/jboss-current/conf/tfel-bindings.xml] for > Service[jboss-tfel2] at > /etc/puppet/modules/jboss/manifests/init.pp:38; using cached catalogIt is expanding ${version} to "current" as shown by the jboss-current string in your File[]. Is this dependency defined? cYa, Avi --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Avi, Yes, it''s defined in a class. Doug. On Sat, Nov 7, 2009 at 5:08 PM, Avi Miller <avi.miller@gmail.com> wrote:> > Douglas, > > Douglas Garstang wrote: >> Could not find dependency >> File[/opt/jboss/jboss-current/conf/tfel-bindings.xml] for >> Service[jboss-tfel2] at >> /etc/puppet/modules/jboss/manifests/init.pp:38; using cached catalog > > It is expanding ${version} to "current" as shown by the jboss-current > string in your File[]. Is this dependency defined? > > cYa, > Avi > > > >-- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garstang@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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, Douglas Garstang wrote:> Yes, it''s defined in a class.Can you pastie the entire thing somewhere? It''s difficult to tell if there is perhaps a scoping issue unless we can see the entire manifest involved. cYa, Avi --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---