This repository has been archived by the owner on Jun 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
/
params.pp
106 lines (104 loc) · 3.21 KB
/
params.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Class: ruby::params
#
# This class handles the Ruby module parameters
#
class ruby::params {
$version = 'installed'
$gems_version = 'installed'
$ruby_switch_package = 'ruby-switch'
$rails_env = 'production'
$minimum_path = ['/usr/bin', '/bin', '/usr/sbin', '/sbin', '/usr/local/bin']
$gem_integration_package = false
$ruby_dev_gems = false
case $::osfamily {
'redhat', 'amazon': {
$ruby_package = 'ruby'
$rubygems_package = 'rubygems'
$ruby_dev = 'ruby-devel'
$rubygems_update = false
if $::operatingsystemmajrelease and versioncmp($::operatingsystemmajrelease, '5') == 0 {
$rake_ensure = '10.3.2'
$rake_package = 'rake'
$rake_provider = 'gem'
} else {
$rake_ensure = 'installed'
$rake_package = 'rubygem-rake'
$rake_provider = 'yum'
}
$bundler_ensure = 'installed'
$bundler_package = 'bundler'
$bundler_provider = 'gem'
}
'Archlinux': {
$ruby_package = 'ruby'
$rubygems_package = undef
$ruby_dev = undef
$rubygems_update = false
$rake_ensure = 'installed'
$rake_package = undef
$rake_provider = 'pacman'
$bundler_ensure = 'installed'
$bundler_package = 'ruby-bundler'
$bundler_provider = 'pacman'
}
'debian': {
$ruby_dev = [
'ruby-dev',
'ri',
'pkg-config',
]
$rake_ensure = 'installed'
$rake_package = 'rake'
$rake_provider = 'apt'
$rubygems_update = false
$ruby_gem_base = '/usr/bin/gem'
$ruby_bin_base = '/usr/bin/ruby'
$bundler_provider = 'gem'
$bundler_package = 'bundler'
case $::operatingsystemrelease {
'10.04': {
$bundler_ensure = '0.9.9'
$ruby_package = 'ruby'
$rubygems_package = 'rubygems'
}
'14.04': {
#Ubuntu 14.04 changed ruby/rubygems to be all in one package. Specifying these as defaults will permit the module to behave as anticipated.
$bundler_ensure = 'installed'
$ruby_package = 'ruby'
$rubygems_package = 'ruby1.9.1-full'
}
'18.04': {
$bundler_ensure = 'installed'
$ruby_package = 'ruby-full'
$rubygems_package = 'rubygems'
}
default: {
$bundler_ensure = 'installed'
$ruby_package = 'ruby'
$rubygems_package = 'rubygems'
}
}
}
'FreeBSD': {
$ruby_dev = [
'ruby-build',
]
$rake_ensure = 'installed'
$rake_package = 'rake'
$rake_provider = 'gem'
$rubygems_update = false
$ruby_gem_base = '/usr/local/bin/gem'
$ruby_bin_base = '/usr/local/bin/ruby'
$bundler_package = 'bundler'
$bundler_provider = 'gem'
$bundler_ensure = 'installed'
$ruby_package = 'ruby'
$rubygems_package = 'ruby20-gems'
}
default: {
fail("Unsupported OS family: ${::osfamily}")
}
}
$ruby_environment_file = '/etc/profile.d/ruby.sh'
$gemrc = '/etc/gemrc'
}