Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/ruby/manifests/init.pp

Issue 5194798336049152: As discussed.. (Closed)
Patch Set: Created April 30, 2015, 9:23 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # == Class: ruby
2 #
3 # Perform a custom Ruby installation based on the ruby-install script,
4 # using /usr/local as installation prefix.
5 #
6 # === Parameters:
7 #
8 # [*version*]
9 # The Ruby version to clone and build.
10 #
11 # === Examples:
12 #
13 # class {'ruby':
14 # version => '2.2.0',
15 # }
16 #
17 class ruby(
18 $version = '2.1.5',
19 ) {
20
21 $ruby_install_source_url = 'https://github.com/postmodern/ruby-install.git'
22 $ruby_install_source_dir = "/root/ruby-install"
23
24 Package {
25 ensure => 'installed',
26 }
27
28 Exec {
29 logoutput => true,
30 path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
31 }
32
33 if !defined(Package['git']) {
34 package {'git': }
35 }
36
37 exec {'ruby-clone-ruby-install':
38 command => shellquote('git', 'clone', $ruby_install_source_url, $ruby_instal l_source_dir),
39 creates => $ruby_install_source_dir,
40 }
41 ->
42 exec {'ruby-execute-ruby-install':
43 command => shellquote("$ruby_install_source_dir/bin/ruby-install", '--system ', 'ruby', $ruby_version),
44 creates => "/usr/local/bin/ruby",
45 }
46
47 Exec['ruby-clone-ruby-install'] <- Package['git']
48 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld