bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject [03/14] bigtop git commit: BIGTOP-2835: puppet fails when bigtop::jdk_preinstalled is true
Date Wed, 02 Aug 2017 23:23:59 GMT
BIGTOP-2835: puppet fails when bigtop::jdk_preinstalled is true

Many modules require Package["jdk"]. Ensure it is available regardless
of the bigtop::jdk_preinstalled option. Modify the jdk class so the
package resources perform a no-op if bigtop::jdk_preinstalled is true.

Signed-off-by: Evans Ye <evansye@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/40e796bd
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/40e796bd
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/40e796bd

Branch: refs/heads/BIGTOP-2839
Commit: 40e796bd693a8bc6243ee39a6540357e1d559ea8
Parents: 4eca9b1
Author: Kevin W Monroe <kevin.monroe@canonical.com>
Authored: Fri Jul 7 16:02:47 2017 +0000
Committer: Evans Ye <evansye@apache.org>
Committed: Fri Jul 21 01:14:07 2017 +0800

----------------------------------------------------------------------
 bigtop-deploy/puppet/manifests/jdk.pp  | 10 ++++++++--
 bigtop-deploy/puppet/manifests/site.pp |  7 ++-----
 2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/40e796bd/bigtop-deploy/puppet/manifests/jdk.pp
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/manifests/jdk.pp b/bigtop-deploy/puppet/manifests/jdk.pp
index 152e8a4..fc2eb4e 100644
--- a/bigtop-deploy/puppet/manifests/jdk.pp
+++ b/bigtop-deploy/puppet/manifests/jdk.pp
@@ -13,6 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+$jdk_preinstalled = hiera("bigtop::jdk_preinstalled", false)
+
 class jdk {
   case $::operatingsystem {
     /Debian/: {
@@ -39,6 +41,7 @@ class jdk {
       package { 'jdk':
         name => 'openjdk-8-jdk',
         ensure => present,
+        noop => $jdk_preinstalled,
       }
 
      }
@@ -48,12 +51,14 @@ class jdk {
       package { 'jdk':
         name => 'openjdk-8-jdk',
         ensure  => present,
+        noop => $jdk_preinstalled,
       }
     }
     /(CentOS|Amazon|Fedora)/: {
       package { 'jdk':
         name => 'java-1.8.0-openjdk-devel',
-        ensure => present
+        ensure => present,
+        noop => $jdk_preinstalled,
       }
       if ($::operatingsystem == "Fedora") {
         file { '/usr/lib/jvm/java-1.8.0-openjdk/jre/lib/security/cacerts':
@@ -65,7 +70,8 @@ class jdk {
     /OpenSuSE/: {
       package { 'jdk':
         name => 'java-1_8_0-openjdk-devel',
-        ensure => present
+        ensure => present,
+        noop => $jdk_preinstalled,
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/40e796bd/bigtop-deploy/puppet/manifests/site.pp
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/manifests/site.pp b/bigtop-deploy/puppet/manifests/site.pp
index cd6e8d5..4763db6 100644
--- a/bigtop-deploy/puppet/manifests/site.pp
+++ b/bigtop-deploy/puppet/manifests/site.pp
@@ -13,11 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-$jdk_preinstalled = hiera("bigtop::jdk_preinstalled", false)
-if ( ! $jdk_preinstalled ) {
-   require jdk
-   Class['jdk'] -> Service<||>
-}
+require jdk
+Class['jdk'] -> Service<||>
 
 $provision_repo = hiera("bigtop::provision_repo", true)
 if ($provision_repo) {


Mime
View raw message