Created
May 8, 2012 16:34
-
-
Save rtyler/2637045 to your computer and use it in GitHub Desktop.
Installs rvm for a specific user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define rvm::install() { | |
exec { | |
"download rvm for ${name}" : | |
creates => "/home/${name}/.rvm/scripts/rvm", | |
cwd => "/home/${name}", | |
command => 'curl -L get.rvm.io -o install-rvm.sh', | |
user => $name, | |
path => ['/bin', '/usr/bin'], | |
notify => Exec["install rvm for ${name}"], | |
require => User[$name]; | |
"install rvm for ${name}" : | |
creates => "/home/${name}/.rvm/scripts/rvm", | |
command => 'bash -s stable < install-rvm.sh', | |
cwd => "/home/${name}", | |
user => $name, | |
environment => ["HOME=/home/${name}"], | |
provider => shell, | |
logoutput => on_failure, | |
refreshonly => true, | |
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'], | |
require => User[$name]; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node default { | |
rvm::install { | |
'tyler' ; ; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment