From a04254895ea1f713ca67576ece9a3ccb72fcb181 Mon Sep 17 00:00:00 2001 From: Cornel Foltea Date: Fri, 19 Jun 2015 17:09:02 +0100 Subject: [PATCH] Revert "fix bunch of puppet-lint issues" --- manifests/init.pp | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 96cde55..4ee70a3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,6 +1,5 @@ -# Install oracle jdk and make it default one. class java ( - $source_url = 'https://download.oracle.com/otn-pub/java/jdk/7u79-b15', + $source_url = "https://download.oracle.com/otn-pub/java/jdk/7u79-b15", $java_major_version = 7, $java_minor_version = 79, ) { @@ -11,20 +10,20 @@ include ::wget wget::fetch { 'jdk': - source => "${source_url}/${java_filename}", - no_cookies => true, - headers => ['Cookie: oraclelicense=accept-securebackup-cookie;'], - destination => "/usr/local/${java_filename}", - timeout => 0, - nocheckcertificate => true, - verbose => false, + source => "${source_url}/$java_filename", + no_cookies => true, + headers => ['Cookie: oraclelicense=accept-securebackup-cookie;'], + destination => "/usr/local/$java_filename", + timeout => 0, + nocheckcertificate => true, + verbose => false, } package {'java': - ensure => "1.${java_major_version}.0_${java_minor_version}-fcs", provider => rpm, - name => 'jdk', - source => "/usr/local/${java_filename}", + name => "jdk", + ensure => "1.${java_major_version}.0_${java_minor_version}-fcs", + source => "/usr/local/$java_filename", require => Wget::Fetch['jdk'], } -> @@ -32,12 +31,12 @@ ensure => file, owner => root, group => root, - mode => '0644', - content => 'export JAVA_HOME=/usr/java/default', + mode => 644, + content => "export JAVA_HOME=/usr/java/default", } -> exec { 'update-java-alternatives': - path => '/bin:/usr/bin:/usr/sbin', + path => "/bin:/usr/bin:/usr/sbin", command => "alternatives --install /usr/bin/java java /usr/java/jdk1.${java_major_version}.0_${java_minor_version}/bin/java 200000", unless => "[ `ls -l /etc/alternatives/java | awk '{print \$11}'` == '/usr/java/jdk1.${java_major_version}.0_${java_minor_version}/bin/java' ]" }