Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #78 from geauxvirtual/master

Add package gcc to ruby.pp for successful installation on CentOS 6.3.
  • Loading branch information...
commit 595ca4781707ff5b092e9598c410cf1690479804 2 parents 9af0bfe + 7ab0ce2
Nan Liu nanliu authored
1  lib/puppet/provider/rz_broker/default.rb
View
@@ -50,6 +50,7 @@ def create
'description' => @resource[:name],
'servers' => @resource[:servers].join(','),
'plugin' => @resource[:plugin],
+ 'version' => @resource[:version],
}
Puppet.debug "razor -w broker add '#{broker.to_pson}'"
4 lib/puppet/type/rz_broker.rb
View
@@ -23,6 +23,10 @@
desc "The broker servers."
end
+ newproperty(:version) do
+ desc "The version of the broker to use"
+ end
+
newproperty(:uuid) do
desc "The broker UUID. This property is not expected to be speciified by the user."
validate do |value|
1  lib/puppet_x/puppet_labs/razor.rb
View
@@ -101,6 +101,7 @@ def get_brokers
:uuid => res[:uuid],
:plugin => res[:plugin],
:servers => res[:servers],
+ :version => res[:broker_version],
}
end
end
4 manifests/init.pp
View
@@ -115,7 +115,7 @@
],
}
- file { '/usr/local/bin/razor':
+ file { '/usr/bin/razor':
ensure => file,
owner => '0',
group => '0',
@@ -135,7 +135,7 @@
type => 'mk',
source => $mk_source,
require => [
- File['/usr/local/bin/razor'],
+ File['/usr/bin/razor'],
Package['curl'],
Service['razor']
],
8 manifests/ruby.pp
View
@@ -20,6 +20,12 @@
ensure => present,
}
}
+
+ if ! defined(Package['gcc']) {
+ package { 'gcc':
+ ensure => present,
+ }
+ }
package { [
'base62',
@@ -38,6 +44,6 @@
]:
ensure => present,
provider => gem,
- require => [ Class['::ruby'], Class['::ruby::dev'], Package['make'] ],
+ require => [ Class['::ruby'], Class['::ruby::dev'], Package['make'], Package['gcc'] ],
}
}
3  spec/classes/razor_ruby_spec.rb
View
@@ -9,6 +9,7 @@
end
it {
should contain_package('make')
+ should contain_package('gcc')
should include_class('ruby')
}
it {
@@ -19,7 +20,7 @@
should contain_package(pkg).with(
:ensure => 'present',
:provider => 'gem',
- :require => [ 'Class[Ruby]', 'Class[Ruby::Dev]', 'Package[make]' ]
+ :require => [ 'Class[Ruby]', 'Class[Ruby::Dev]', 'Package[make]', 'Package[gcc]' ]
)
end
}
Please sign in to comment.
Something went wrong with that request. Please try again.