Hi Max, Making the module directory structure is pretty easy and will serve you well as you develop your manifest.
mkdir -p /etc/puppet/manifests/jdk/manifests Then copy your jdk class into init.pp in that new directory. Alternatively you can add the import clause into site.pp to find your jdk class. import '*.pp' That will tell puppet to import any .pp file in the same directory as site.pp. Regards, Den On 21/04/2013, at 23:18, max.bridgewa...@gmail.com wrote: > Hi, > > Trying to get some understanding on how code should be structured in Puppet. > I have a class oracle_java defined to deploy the Java virtual machine on the > agents (basically copy of > http://log.scalemotion.com/2013/04/oracle-java-under-linux-with-puppet.html). > It works fine if i copy the body of the class (omitting the class > declaration) within site.pp. But that's no way to do business as you may > presume. > > Now, I put the class under /etc/puppet/manifests/jdk.pp and change site.pp > into: > > node default{ > include jdk > } > > Unfortunately, this doesn't work. I keep getting the following error message > from the agent: > > Could not retrieve catalog from remote server: Error 400 on SERVER: Could not > find class jdk for > ec2-52-221-193-75.compute-1.amazonaws.com-c1421f15-ac06-c6ab-6b5d-95f238bf27c7. > > Is there a way to reference a class in site.pp without creating a module? > > Thanks, > Max. > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscr...@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.