Hi, I''m having trouble getting autoload to work as I expect. I''m trying to use a virtual type I''ve defined inside a module class. Please consider: http://github.com/jeffmccune/puppet-modules/tree/master/typetest/manifests/typetest.pp class typetest { define echotest ($message = "Hello world!") { include typetest $name_real = $name exec { "exec-$name_real": path => "/bin:/usr/bin", command => "echo ''${message}''"; } } } I then have a trivial manifest to exercise this "typetest" module: include foobar typetest::echotest { "roottest": message => ''This resource from the top level.'' } class foobar { typetest::echotest { "subtest": message => ''This resource from class foobar.'' } } I run this with puppet -vd --modulepath=${PWD}/typetest/manifests/typetest.pp typetest/manifests/testme.pp And I get: jmccune@page:~$ puppet -vd --modulepath=/export/home/jmccune/dev/puppet-modules /export/home/jmccune/dev/puppet-modules/typetest/manifests/testme.pp debug: importing ''/export/home/jmccune/dev/puppet-modules/typetest/manifests/init.pp'' debug: importing ''/export/home/jmccune/dev/puppet-modules/typetest/manifests/typetest.pp'' info: Autoloaded module typetest Could not find resource type typetest::echotest at /export/home/jmccune/dev/puppet-modules/typetest/manifests/testme.pp:6 on node page However, if I swap the first two lines, the manifest works perfectly fine: typetest::echotest { "roottest": message => ''This resource from the top level.'' } include foobar class foobar { typetest::echotest { "subtest": message => ''This resource from class foobar.'' } } What''s the best way to organize this correctly? Thanks, Jeff McCune --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jun 2, 2008, at 12:44 PM, Jeff McCune wrote:> However, if I swap the first two lines, the manifest works perfectly > fine: > typetest::echotest { "roottest": message => ''This resource from the > top level.'' } > include foobar > > class foobar > { > typetest::echotest { "subtest": message => ''This resource from class > foobar.'' } > } > > What''s the best way to organize this correctly?Are you using 24.4? I think that''s a bug that was found and fixed, and I *think* the fix is released in 24.4. -- The great aim of education is not knowledge but action. -- Herbert Spencer --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> > What''s the best way to organize this correctly? > > Are you using 24.4? I think that''s a bug that was found and fixed, > and I *think* the fix is released in 24.4.I am using 24.4 from the Ubuntu Hardy Heron 8.04 package. No need to worry about it, I''ll go hunt through the tickets and sort it out there, as it is a bug. Thanks, -Jeff McCune --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---