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

Delta Between Two Patch Sets: modules/ruby/manifests/init.pp

Issue 5194798336049152: As discussed.. (Closed)
Left Patch Set: Redmine Evaluation Setup - Various Fixes Created April 30, 2015, 9:33 a.m.
Right Patch Set: Redmine Evaluation Setup - Introduce $logoutput Created April 30, 2015, 11:04 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # == Class: ruby 1 # == Class: ruby
2 # 2 #
3 # Perform a custom Ruby installation based on the ruby-install script, 3 # Perform a custom Ruby installation based on the ruby-install script,
4 # using /usr/local as installation prefix. 4 # using /usr/local as installation prefix.
5 # 5 #
6 # === Parameters: 6 # === Parameters:
7 # 7 #
8 # [*version*] 8 # [*version*]
9 # The Ruby version to build and install. 9 # The Ruby version to build and install.
10 # 10 #
11 # [*logoutput*]
12 # Whether and when to log the output of Exec resources; see
13 # https://docs.puppetlabs.com/references/latest/type.html#exec-attribute-logou tput
14 #
11 # === Examples: 15 # === Examples:
12 # 16 #
13 # class {'ruby': 17 # class {'ruby':
14 # version => '2.2.0', 18 # version => '2.2.0',
19 # logoutput => true,
15 # } 20 # }
16 # 21 #
17 class ruby( 22 class ruby(
18 $version = '2.1.5', 23 $version = '2.1.5',
24 $logoutput = 'on_failure',
19 ) { 25 ) {
20 26
21 $install_src_url = 'https://github.com/postmodern/ruby-install.git' 27 $install_src_url = 'https://github.com/postmodern/ruby-install.git'
22 $install_src_dir = '/root/ruby-install' 28 $install_src_dir = '/root/ruby-install'
23 $install_command = "$install_src_dir/bin/ruby-install" 29 $install_command = "$install_src_dir/bin/ruby-install"
24 30
25 Exec { 31 Exec {
26 logoutput => true, 32 logoutput => true,
27 path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 33 path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
28 } 34 }
29 35
30 if !defined(Package['git']) { 36 if !defined(Package['git']) {
31 37
32 package {'git': 38 package {'git':
33 ensure => 'installed', 39 ensure => 'installed',
34 } 40 }
35 } 41 }
36 42
37 exec {'ruby-clone-ruby-install': 43 exec {'ruby-clone-ruby-install':
38 command => shellquote('git', 'clone', $install_src_url, $install_src_dir), 44 command => shellquote('git', 'clone', $install_src_url, $install_src_dir),
39 creates => $install_src_dir, 45 creates => $install_src_dir,
46 logoutput => $logoutput,
40 require => Package['git'], 47 require => Package['git'],
41 } 48 }
42 -> 49 ->
43 exec {'ruby-execute-ruby-install': 50 exec {'ruby-execute-ruby-install':
44 command => shellquote($install_command, '--system', 'ruby', $version), 51 command => shellquote($install_command, '--system', 'ruby', $version),
45 creates => '/usr/local/bin/ruby', 52 creates => '/usr/local/bin/ruby',
53 logoutput => $logoutput,
46 } 54 }
47 } 55 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld