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: As discussed.. Created April 30, 2015, 9:33 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 build and install.
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 $install_src_url = 'https://github.com/postmodern/ruby-install.git'
22 $install_src_dir = '/root/ruby-install'
23 $install_command = "$install_src_dir/bin/ruby-install"
24
25 Exec {
26 logoutput => true,
27 path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
28 }
29
30 if !defined(Package['git']) {
31
32 package {'git':
33 ensure => 'installed',
34 }
35 }
36
37 exec {'ruby-clone-ruby-install':
38 command => shellquote('git', 'clone', $install_src_url, $install_src_dir),
39 creates => $install_src_dir,
40 require => Package['git'],
41 }
42 ->
43 exec {'ruby-execute-ruby-install':
44 command => shellquote($install_command, '--system', 'ruby', $version),
45 creates => '/usr/local/bin/ruby',
46 }
47 }
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