Install rubygems for puppetmaster on CentOS 6
This commit is contained in:
parent
77d23db4b2
commit
274cee2ad8
2 changed files with 27 additions and 13 deletions
|
@ -3,14 +3,27 @@
|
|||
#
|
||||
class mongrel {
|
||||
|
||||
require ruby::rubygems
|
||||
|
||||
package { "mongrel":
|
||||
name => $operatingsystem ? {
|
||||
ensure => installed,
|
||||
name => $operatingsystem ? {
|
||||
openbsd => "ruby-mongrel",
|
||||
debian => "mongrel",
|
||||
ubuntu => "mongrel",
|
||||
centos => $operatingsystemrelease ? {
|
||||
/^[1-5]/ => "rubygem-mongrel",
|
||||
default => "mongrel",
|
||||
},
|
||||
default => "rubygem-mongrel",
|
||||
},
|
||||
ensure => installed,
|
||||
provider => $operatingsystem ? {
|
||||
centos => $operatingsystemrelease ? {
|
||||
/^[1-5]/ => undef,
|
||||
default => "gem",
|
||||
},
|
||||
default => undef,
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -218,6 +218,7 @@ class puppet::server::common inherits puppet::client {
|
|||
}
|
||||
|
||||
if $puppet_storeconfigs != "none" {
|
||||
require ruby::rubygems
|
||||
case $operatingsystem {
|
||||
"centos": {
|
||||
if $operatingsystemrelease =~ /^[1-5]/ {
|
||||
|
@ -225,6 +226,15 @@ class puppet::server::common inherits puppet::client {
|
|||
"rubygem-sqlite3-ruby", ]:
|
||||
ensure => installed,
|
||||
}
|
||||
} else {
|
||||
package { "rails":
|
||||
ensure => "2.3.14",
|
||||
provider => "gem",
|
||||
}
|
||||
package { "sqlite3":
|
||||
ensure => installed,
|
||||
provider => "gem",
|
||||
}
|
||||
}
|
||||
}
|
||||
"debian","ubuntu": {
|
||||
|
@ -489,6 +499,7 @@ class puppet::server::mongrel {
|
|||
}
|
||||
|
||||
include ldap::client::ruby
|
||||
include ::mongrel
|
||||
|
||||
service { "puppetmaster":
|
||||
ensure => running,
|
||||
|
@ -496,17 +507,7 @@ class puppet::server::mongrel {
|
|||
hasstatus => true,
|
||||
subscribe => File["/etc/puppet/fileserver.conf",
|
||||
"/etc/puppet/puppet.conf"],
|
||||
}
|
||||
|
||||
if $operatingsystem == "CentOS" and $operatingsystemrelease !~ /^[1-5]/ {
|
||||
Service["puppetmaster"] {
|
||||
require => Package["puppetmaster"]
|
||||
}
|
||||
} else {
|
||||
include ::mongrel
|
||||
Service["puppetmaster"] {
|
||||
require => Package["puppetmaster", "mongrel"]
|
||||
}
|
||||
require => Package["puppetmaster", "mongrel"],
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
|
|
Loading…
Add table
Reference in a new issue