BIGTOP-2934: Consolidate puppet usage by installing puppet from distro

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

Branch: refs/heads/master
Commit: ae08802360f4edea5630b82327eaa91a5889350a
Parents: 761d28d
Author: Olaf Flebbe <[email protected]>
Authored: Sun Nov 19 13:05:27 2017 +0100
Committer: Olaf Flebbe <[email protected]>
Committed: Sun Nov 19 22:48:04 2017 +0100

----------------------------------------------------------------------
 bigtop_toolchain/bin/puppetize.sh | 43 +++++++++++++---------------------
 1 file changed, 16 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/ae088023/bigtop_toolchain/bin/puppetize.sh
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/bin/puppetize.sh 
b/bigtop_toolchain/bin/puppetize.sh
index 96031ee..a3f447a 100755
--- a/bigtop_toolchain/bin/puppetize.sh
+++ b/bigtop_toolchain/bin/puppetize.sh
@@ -22,39 +22,28 @@ fi
 
 case ${ID}-${VERSION_ID} in
     fedora-26)
-        dnf -y install yum-utils
-        dnf -y update 
-        dnf -y install hostname findutils curl sudo unzip wget puppet
+      dnf -y install yum-utils
+      dnf -y update
+      dnf -y install hostname findutils curl sudo unzip wget puppet 
puppetlabs-stdlib
         ;;
     ubuntu-16.04)
         apt-get update
-        apt-get -y install wget curl sudo unzip puppet 
software-properties-common
-       ;;
+        apt-get -y install wget curl sudo unzip puppet 
software-properties-common puppet-module-puppetlabs-apt 
puppet-module-puppetlabs-stdlib
+        ;;
     debian-9*)
         apt-get update
-        apt-get -y install wget curl sudo unzip puppet
-        ;;
+        apt-get -y install wget curl sudo unzip puppet 
puppet-module-puppetlabs-apt puppet-module-puppetlabs-stdlib
+         ;;
     opensuse-42.3)
-       zypper --gpg-auto-import-keys install -y curl sudo unzip wget puppet 
suse-release ca-certificates-mozilla net-tools tar
-       ;;
+        zypper --gpg-auto-import-keys install -y curl sudo unzip wget puppet 
suse-release ca-certificates-mozilla net-tools tar
+        puppet module install puppetlabs-stdlib
+        ;;
     centos-7*)
-        if [ $HOSTTYPE = "x86_64" ] ; then
-          rpm -ivh 
https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
-        fi
-       yum -y install hostname curl sudo unzip wget puppet
-       ;;
+        rpm -ivh 
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+        yum -y install hostname curl sudo unzip wget puppet puppetlabs-stdlib
+        ;;
     *)
-       echo "Unsupported OS ${ID}-${VERSION_ID}."
-       exit 1
-esac
-
-puppet module install puppetlabs-stdlib
-
-case ${ID} in
-   debian|ubuntu)
-       version=""
-       if [ `puppet --version | cut -c1` -lt "4" ]; then
-           version="--version 2.4.0"
-       fi
-      puppet module install puppetlabs-apt $version;;
+        echo "Unsupported OS ${ID}-${VERSION_ID}."
+        exit 1
+        ;;
 esac

Reply via email to