aboutsummaryrefslogtreecommitdiff
path: root/bigtop_toolchain
diff options
context:
space:
mode:
authorKengo Seki <sekikn@apache.org>2016-06-03 05:21:38 +0000
committerKonstantin Boudnik <cos@apache.org>2016-06-03 14:38:37 -0700
commitf2d91af336dd33d59db64c8f61b9a0f02b152590 (patch)
tree78c513ada550030c813a5c928fb41477b619268b /bigtop_toolchain
parentf612db1508aaf5af0fcc226d290cbb90fb0674e1 (diff)
BIGTOP-2374: Toolchain needs clear warning for Puppet <3
Signed-off-by: Konstantin Boudnik <cos@apache.org>
Diffstat (limited to 'bigtop_toolchain')
-rw-r--r--bigtop_toolchain/manifests/puppet-modules-prereq.pp21
-rw-r--r--bigtop_toolchain/manifests/puppet-modules.pp7
2 files changed, 26 insertions, 2 deletions
diff --git a/bigtop_toolchain/manifests/puppet-modules-prereq.pp b/bigtop_toolchain/manifests/puppet-modules-prereq.pp
new file mode 100644
index 00000000..7b6a8cf9
--- /dev/null
+++ b/bigtop_toolchain/manifests/puppet-modules-prereq.pp
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class bigtop_toolchain::puppet-modules-prereq {
+
+ if versioncmp($::puppetversion,'3.0.0') < 0 {
+ fail("bigtop_toolchain::puppet-modules requires Puppet 3.0.0+, but found: $::puppetversion")
+ }
+}
diff --git a/bigtop_toolchain/manifests/puppet-modules.pp b/bigtop_toolchain/manifests/puppet-modules.pp
index 20b39f84..3fab254f 100644
--- a/bigtop_toolchain/manifests/puppet-modules.pp
+++ b/bigtop_toolchain/manifests/puppet-modules.pp
@@ -18,7 +18,6 @@ class bigtop_toolchain::puppet-modules {
exec { 'install-puppet-stdlib':
path => '/usr/bin:/bin',
command => 'puppet module install puppetlabs-stdlib',
- onlyif => "test `facter puppetversion |cut -d'.' -f 1` -ge 3",
creates => '/etc/puppet/modules/stdlib',
}
@@ -27,9 +26,13 @@ class bigtop_toolchain::puppet-modules {
exec { 'install-puppet-apt':
path => '/usr/bin:/bin',
command => 'puppet module install puppetlabs-apt',
- onlyif => "test `facter puppetversion |cut -d'.' -f 1` -ge 3",
creates => '/etc/puppet/modules/apt',
}
}
}
+
+ stage { 'first':
+ before => Stage['main'],
+ }
+ class { 'bigtop_toolchain::puppet-modules-prereq': stage => 'first' }
}