Thank you for getting back to me on this. This is my init.pp file:
class java {
require java::params
file {"$java::params::java_base":
ensure => "directory",
owner => "root",
group => "root",
alias => "java-base"
}
file { "${java::params::java_base}/jdk${java::params::java_version}.tar.gz":
mode => 0644,
owner => root,
group => root,
source => "puppet:///modules/java/jdk${java::params::java_version}.tar.gz",
alias => "java-source-tgz",
before => Exec["untar-java"],
require => File["java-base"]
}
exec { "untar jdk${java::params::java_version}.tar.gz":
command => "tar -zxf jdk${java::params::java_version}.tar.gz",
cwd => "${java::params::java_base}",
creates => "${java::params::java_base}/jdk${java::params::java_version}",
alias => "untar-java",
refreshonly => true,
subscribe => File["java-source-tgz"],
before => File["java-app-dir"]
}
file { "${java::params::java_base}/jdk${java::params::java_version}":
ensure => "directory",
mode => 0644,
owner => root,
group => root,
alias => "java-app-dir"
}
}
Based on what I understand you saying, class java is interpreted as the module name and the class would be called java_base. Unfortunately, this didn't work either. Do I have this wrong?
On Thursday, December 20, 2012 3:34:25 PM UTC-8, Kevin Kitchen wrote:
I've just installed PE 2.7 and went through the quickstart. I was able to install the motd module without an issue. I decided to try a Java install module to test what I've (not) learned. I've looked at the init.pp file, the name of the class is "java". It shows as installed correctly on the agent using the puppet install command. I've added it in the console and added it on the agent in the console. When I run puppet agent --test on the agent side it comes back with: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class java for puppet-node1 on node puppet-node1