Skip to content

Commit

Permalink
Fix rvm gemset installation (newer rvm version complaining for callin…
Browse files Browse the repository at this point in the history
…g directly rvm script)
  • Loading branch information
jbarreneche committed Dec 20, 2011
1 parent f270adc commit 8e091fd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions rvm/manifests/init.pp
Expand Up @@ -9,7 +9,7 @@
} }


define user ( $user = 'root' ) { define user ( $user = 'root' ) {
exec {"group-assign-$user": exec {"group-assign-${user}":
unless => "/usr/bin/groups ${user} | grep rvm", unless => "/usr/bin/groups ${user} | grep rvm",
command => "/usr/sbin/usermod -aG rvm ${user}", command => "/usr/sbin/usermod -aG rvm ${user}",
require => Exec['rvm-install'] require => Exec['rvm-install']
Expand All @@ -31,10 +31,11 @@
Class["rvm"] -> Package<| provider == rvm |> Class["rvm"] -> Package<| provider == rvm |>


define gemset($ruby, $gemset) { define gemset($ruby, $gemset) {
exec {"create $ruby@$gemset": exec {"create ${ruby}@${gemset}":
command => "/usr/local/rvm/bin/rvm use $ruby@$gemset --create", command => "bash -lc 'rvm use ${ruby}@${gemset} --create'",
path => '/usr/bin:/usr/sbin:/bin:/usr/local/rvm/bin',
require => Package[$ruby], require => Package[$ruby],
creates => "/usr/local/rvm/gems/$ruby@$gemset" creates => "/usr/local/rvm/gems/${ruby}@${gemset}",
} }
} }
} }

0 comments on commit 8e091fd

Please sign in to comment.