summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2012-10-17 15:35:43 -0400
committerMicah Anderson <micah@riseup.net>2012-10-17 15:35:43 -0400
commitd60f980d4918708531483c134ee7cacd902724aa (patch)
treeda1accc165d501f20b9c59569ef5dae51f634c52
parenta8b4676955163dc5e4148e6968bc991c390f0333 (diff)
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)
-rw-r--r--manifests/install.pp7
-rw-r--r--manifests/params.pp1
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'