Initial version of puppet::server.
This commit is contained in:
parent
c6c12bb4a7
commit
562a93ea45
1 changed files with 70 additions and 8 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
# Install and configure Puppet client.
|
# Install and configure Puppet client.
|
||||||
#
|
#
|
||||||
class puppet::client {
|
class puppet::client {
|
||||||
|
@ -33,19 +34,19 @@ class puppet::client {
|
||||||
default => root
|
default => root
|
||||||
},
|
},
|
||||||
require => Package["puppet"],
|
require => Package["puppet"],
|
||||||
notify => Service["puppet"],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case $operatingsystem {
|
case $operatingsystem {
|
||||||
openbsd: {
|
openbsd: {
|
||||||
service { "puppet":
|
service { "puppet":
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
enable => true,
|
||||||
binary => "/usr/local/bin/puppetd",
|
binary => "/usr/local/bin/puppetd",
|
||||||
start => "/usr/local/bin/puppetd",
|
start => "/usr/local/bin/puppetd",
|
||||||
restart => "/usr/bin/pkill -HUP -f /usr/local/bin/puppetd",
|
restart => "/usr/bin/pkill -HUP -f /usr/local/bin/puppetd",
|
||||||
pattern => puppetd,
|
pattern => puppetd,
|
||||||
require => Package["puppet"],
|
require => Package["puppet"],
|
||||||
|
subscribe => File["/etc/puppet/puppet.conf"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
@ -54,8 +55,69 @@ class puppet::client {
|
||||||
enable => true,
|
enable => true,
|
||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
require => Package["puppet"],
|
require => Package["puppet"],
|
||||||
|
subscribe => File["/etc/puppet/puppet.conf"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Install and configure Puppet server
|
||||||
|
#
|
||||||
|
# === Global variables
|
||||||
|
#
|
||||||
|
# $puppet_listenports:
|
||||||
|
# Array containing ports that puppetmaster should listen to. Defaults to
|
||||||
|
# [ "18140", "18141", "18142", "18143", ].
|
||||||
|
#
|
||||||
|
class puppet::server inherits puppet::client {
|
||||||
|
|
||||||
|
if ! $puppet_listenports {
|
||||||
|
$puppet_listenports = [ "18140", "18141", "18142", "18143", ]
|
||||||
|
}
|
||||||
|
|
||||||
|
package { "puppet-server":
|
||||||
|
ensure => installed,
|
||||||
|
}
|
||||||
|
|
||||||
|
package { [ "rubygem-mongrel",
|
||||||
|
"rubygem-rails",
|
||||||
|
"rubygem-sqlite3-ruby",
|
||||||
|
"ruby-RRDtool",
|
||||||
|
"ruby-ldap", ]:
|
||||||
|
ensure => installed,
|
||||||
|
}
|
||||||
|
|
||||||
|
service { "puppetmaster":
|
||||||
|
ensure => running,
|
||||||
|
enable => true,
|
||||||
|
hasstatus => true,
|
||||||
|
require => Package["puppet-server"],
|
||||||
|
subscribe => File["/etc/puppet/puppet.conf"],
|
||||||
|
}
|
||||||
|
|
||||||
|
File["/etc/puppet/puppet.conf"] {
|
||||||
|
content => template("puppet/puppet.conf.erb", "puppet/puppetmaster.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "/etc/puppet/tagmail.conf":
|
||||||
|
ensure => present,
|
||||||
|
source => [ "puppet:///files/puppet/tagmail.conf.${fqdn}",
|
||||||
|
"puppet:///files/puppet/tagmail.conf",
|
||||||
|
"puppet:///puppet/tagmail.conf", ],
|
||||||
|
mode => 0644,
|
||||||
|
owner => root,
|
||||||
|
group => root,
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "/etc/sysconfig/puppetmaster":
|
||||||
|
ensure => present,
|
||||||
|
content => template("puppet/puppetmaster.sysconfig.erb"),
|
||||||
|
mode => 0644,
|
||||||
|
owner => root,
|
||||||
|
group => root,
|
||||||
|
notify => Service["puppetmaster"],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue