could not retrieve information from environment development source(s) file:/etc/puppetlabs/puppet/modules/java_versions/scripts/java_path.sh

asked 2014-05-21 10:12:30 -0600

supriya gravatar image

Hi,

I am having an error could not retrieve information development source file:/etc/puppetlabs/puppet/modules/javaversions/scripts/javapath.sh

Please help me

I have a code in /etc/puppetlabs/puppet/modules/java_versions/manifests/init.pp

class java_versions {

$::varjavaver = '1.7.0_42'

file {'/usr/local/sbin/javapath.sh': source => '/etc/puppetlabs/puppet/modules/javaversions/scripts/java_path.sh', owner => root, group => root, mode => '0700', }

if versioncmp($::varjavaver, $javaversion) < 0 { notify {"using concatenated files, java version ${javaversion}":; } } else { # work with java notify {"using java, java version ${java_version}":; } }

file {'/usr/local/sbin/java.sh':

# source => '/etc/puppetlabs/puppet/modules/javaversions/scripts/java.sh', #owner => root, #group => root, #mode => '700', #} if $javaversion == 'notexit' {

warning('java versions are not available ($java_version)') } }

And script in /etc/puppetlabs/puppet/modules/javaversions/scripts/javapath.sh

$cat javapath.sh runuser -l oracle -c '/u01/app/oracle/product/jdk1.7.025/bin/java -version'

Ruby code :/etc/puppetlabs/puppet/modules/javaversions/lib/facter/javapath.rb

$vi java_path.rb require 'facter'

Facter.add(:javapath) do setcode do Facter::Util::Resolution.exec('/etc/puppetlabs/puppet/modules/javaversions/ scripts/java_path.sh') end end

edit retag flag offensive close merge delete