Repository: bigtop Updated Branches: refs/heads/master f612db150 -> f2d91af33
BIGTOP-2374: Toolchain needs clear warning for Puppet <3 Signed-off-by: Konstantin Boudnik <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/f2d91af3 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/f2d91af3 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/f2d91af3 Branch: refs/heads/master Commit: f2d91af336dd33d59db64c8f61b9a0f02b152590 Parents: f612db1 Author: Kengo Seki <[email protected]> Authored: Fri Jun 3 05:21:38 2016 +0000 Committer: Konstantin Boudnik <[email protected]> Committed: Fri Jun 3 14:38:37 2016 -0700 ---------------------------------------------------------------------- .../manifests/puppet-modules-prereq.pp | 21 ++++++++++++++++++++ bigtop_toolchain/manifests/puppet-modules.pp | 7 +++++-- 2 files changed, 26 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/f2d91af3/bigtop_toolchain/manifests/puppet-modules-prereq.pp ---------------------------------------------------------------------- diff --git a/bigtop_toolchain/manifests/puppet-modules-prereq.pp b/bigtop_toolchain/manifests/puppet-modules-prereq.pp new file mode 100644 index 0000000..7b6a8cf --- /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") + } +} http://git-wip-us.apache.org/repos/asf/bigtop/blob/f2d91af3/bigtop_toolchain/manifests/puppet-modules.pp ---------------------------------------------------------------------- diff --git a/bigtop_toolchain/manifests/puppet-modules.pp b/bigtop_toolchain/manifests/puppet-modules.pp index 20b39f8..3fab254 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' } }
