forked from voxpupuli/puppet-r10k
-
Notifications
You must be signed in to change notification settings - Fork 5
/
gem.pp
47 lines (44 loc) · 1.13 KB
/
gem.pp
1
2
3
4
5
6
7
8
9
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
45
46
47
# Install the r10k gem using system ruby
class r10k::install::gem (
$manage_ruby_dependency,
$version,
) {
#include ::r10k
require git
anchor{'r10k::ruby_done':}
case $manage_ruby_dependency {
include: {
include ::ruby
include ::ruby::dev
Class['::ruby'] ->
Class['ruby::dev'] ->
Anchor['r10k::ruby_done']
}
declare: {
class { '::ruby':
rubygems_update => false,
}
include ::ruby::dev
Class['::ruby'] ->
Class['::ruby::dev'] ->
Anchor['r10k::ruby_done']
}
default: {
#This catches the 'ignore' case, and satisfies the 'default' requirement
#do nothing
}
}
# Explicit dependency chaining to make sure the system is ready to compile
# native extentions for dependent rubygems by the time r10k installation
# begins
if versioncmp('1.0.0', $version) > 0 {
# I am not sure all of this is required as I assumed the
# ruby::dev class would have taken care of some of it
include make
include gcc
Anchor['r10k::ruby_done'] ->
Class['gcc'] ->
Class['make'] ->
Package['r10k']
}
}