From d60f980d4918708531483c134ee7cacd902724aa Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Wed, 17 Oct 2012 15:35:43 -0400 Subject: enable other bundler installation possibilities The way bundler was installed was either via the rvm method, or through gems. This change provides a parameter $install_method that allows for the non-rvm puppet package resource installation method to be passed a different provider than gem, if desired (eg. for package installation) --- manifests/install.pp | 7 ++++--- manifests/params.pp | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/manifests/install.pp b/manifests/install.pp index fe7bb60..e464390 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -19,8 +19,9 @@ # class bundler::install ( $ruby_version, - $ensure = 'present', - $use_rvm = $bundler::params::use_rvm, + $ensure = 'present', + $use_rvm = $bundler::params::use_rvm, + $install_method = $bundler::params::install_method, ) inherits bundler::params { if $use_rvm == true { @@ -33,7 +34,7 @@ class bundler::install ( else { package { 'bundler': ensure => $ensure, - provider => 'gem', + provider => $install_method, } } diff --git a/manifests/params.pp b/manifests/params.pp index 109af98..b80dbab 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -18,6 +18,7 @@ class bundler::params { $user = 'root' $home_dir_base_path = '/home' $use_rvm = true + $install_method = gem $rvm_bin = '/usr/local/rvm/bin/rvm' $rvm_gem_path = '/usr/local/rvm/gems' $rvm_gemset = 'global' -- cgit v1.2.3