10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'manifests/rbenv.pp', line 10
class ruby::rbenv(
$ensure = $ruby::rbenv::ensure,
$prefix = $ruby::rbenv::prefix,
$user = $ruby::rbenv::user,
$plugins = {}
) {
require ruby
repository { $prefix:
ensure => $ensure,
force => true,
source => 'sstephenson/rbenv',
user => $user
}
file { "${prefix}/versions":
ensure => symlink,
force => true,
backup => false,
target => '/opt/rubies',
require => Repository[$prefix]
}
if !empty($plugins) and $ensure != 'absent' {
file { "${prefix}/plugins":
ensure => directory,
require => Repository[$prefix]
}
create_resources('ruby::rbenv::plugin', $plugins)
}
}
|