Added support for Debian and Ubuntu to puppet module.
This commit is contained in:
parent
7c2fdbd268
commit
f4f3f467a2
2 changed files with 84 additions and 6 deletions
|
@ -50,6 +50,18 @@ class puppet::client {
|
|||
subscribe => File["/etc/puppet/puppet.conf"],
|
||||
}
|
||||
}
|
||||
debian,ubuntu: {
|
||||
service { "puppet":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
restart => "/usr/bin/pkill -HUP puppetd",
|
||||
subscribe => File["/etc/puppet/puppet.conf"],
|
||||
}
|
||||
augeas { "set-default-puppet":
|
||||
context => "/files/etc/default/puppet",
|
||||
changes => ["set START yes"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
service { "puppet":
|
||||
ensure => running,
|
||||
|
@ -95,6 +107,14 @@ class puppet::manual inherits puppet::client {
|
|||
ensure => absent,
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
Augeas["set-default-puppet"] {
|
||||
changes => ["set START no"],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -129,6 +149,7 @@ class puppet::server inherits puppet::client {
|
|||
|
||||
package { "puppetmaster":
|
||||
name => $operatingsystem ? {
|
||||
debian => "puppetmaster",
|
||||
ubuntu => "puppetmaster",
|
||||
default => "puppet-server",
|
||||
},
|
||||
|
@ -145,10 +166,21 @@ class puppet::server inherits puppet::client {
|
|||
include mongrel
|
||||
include ldap::client::ruby
|
||||
|
||||
package { [ "rubygem-rails",
|
||||
"rubygem-sqlite3-ruby",
|
||||
"ruby-RRDtool", ]:
|
||||
ensure => installed,
|
||||
case $operatingsystem {
|
||||
debian,ubuntu: {
|
||||
package { [ "rails",
|
||||
regsubst($rubyversion, '^([0-9]+\.[0-9]+)\..*', 'libsqlite3-ruby\1'),
|
||||
regsubst($rubyversion, '^([0-9]+\.[0-9]+)\..*', 'librrd-ruby\1'), ]:
|
||||
ensure => installed,
|
||||
}
|
||||
}
|
||||
default: {
|
||||
package { [ "rubygem-rails",
|
||||
"rubygem-sqlite3-ruby",
|
||||
"ruby-RRDtool", ]:
|
||||
ensure => installed,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if $puppet_datadir {
|
||||
|
@ -254,9 +286,19 @@ class puppet::server inherits puppet::client {
|
|||
require => Package["puppetmaster"],
|
||||
notify => Service["puppetmaster"],
|
||||
}
|
||||
|
||||
|
||||
case $operatingsystem {
|
||||
fedora,centos: {
|
||||
debian,ubuntu: {
|
||||
file { "/etc/default/puppetmaster":
|
||||
ensure => present,
|
||||
content => template("puppet/puppetmaster.default.erb"),
|
||||
mode => 0644,
|
||||
owner => root,
|
||||
group => root,
|
||||
notify => Service["puppetmaster"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
file { "/etc/sysconfig/puppetmaster":
|
||||
ensure => present,
|
||||
content => template("puppet/puppetmaster.sysconfig.erb"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue