aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKengo Seki <sekikn@apache.org>2017-05-23 11:27:37 -0400
committerEvans Ye <evansye@apache.org>2017-07-01 12:52:53 +0000
commit1aa5667b35f8c9ebb02b6944950ff32b6551ff64 (patch)
tree0d5041804154dd26eaf67cb76969e60022235ae8
parent55f8033859bb08c2ff76781457aa2f006e69f7f0 (diff)
BIGTOP-2774. gradlew toolchain does not work on Ubuntu 16.04.2/Puppet 3.8.5
Closes #214
-rw-r--r--bigtop_toolchain/manifests/puppet-modules.pp7
-rw-r--r--build.gradle2
2 files changed, 7 insertions, 2 deletions
diff --git a/bigtop_toolchain/manifests/puppet-modules.pp b/bigtop_toolchain/manifests/puppet-modules.pp
index 3fab254f..38ecca26 100644
--- a/bigtop_toolchain/manifests/puppet-modules.pp
+++ b/bigtop_toolchain/manifests/puppet-modules.pp
@@ -23,9 +23,14 @@ class bigtop_toolchain::puppet-modules {
case $operatingsystem{
/Ubuntu|Debian/: {
+ if versioncmp($::puppetversion, '4') < 0 {
+ $version = '--version 2.4.0'
+ } else {
+ $version = ''
+ }
exec { 'install-puppet-apt':
path => '/usr/bin:/bin',
- command => 'puppet module install puppetlabs-apt',
+ command => "puppet module install puppetlabs-apt ${version}",
creates => '/etc/puppet/modules/apt',
}
}
diff --git a/build.gradle b/build.gradle
index c2099158..258bed5e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -226,7 +226,7 @@ task toolchain(type:Exec,
description: 'Setup dev. env via toolchain; Requires: Puppet, sudo',
group: DEVENV_GROUP) {
def command = [
- 'sudo', 'puppet', 'apply', '-d',
+ 'sudo', 'puppet', 'apply', '-d', '--parser', 'future',
"--modulepath=${projectDir.absolutePath}:/etc/puppet/modules", '-e',
'include bigtop_toolchain::installer'
]