redoing older doings
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
@@puppet::puppetmaster::privatedir { $fqdn: l_fqdn => generate('/usr/bin/env', 'perl', '-e', '$_=shift;tr/[A-Z]/[a-z]/;print $_',
|
||||
"$fqdn") }
|
||||
|
||||
import "defines/*.pp"
|
||||
|
||||
class puppet (
|
||||
@@ -20,10 +17,12 @@ class puppet (
|
||||
require 'puppet::common'
|
||||
|
||||
if !defined(Class['puppet::puppetlabs_apt']) {
|
||||
class { 'puppet::puppetlabs_apt': }
|
||||
require 'puppet::puppetlabs_apt'
|
||||
}
|
||||
|
||||
# @@puppet::puppetmaster::privatedir { $fqdn: l_fqdn => generate('/usr/bin/env', 'perl', '-e', '$_=shift;tr/[A-Z]/[a-z]/;print $_',
|
||||
# "$fqdn") }
|
||||
|
||||
case $kernel {
|
||||
"Linux" : {
|
||||
$puppetpkgs = ["puppet", "puppet-common"]
|
||||
@@ -62,7 +61,7 @@ class puppet (
|
||||
notice("${fqdn} PUPPET-CRON: cron_real: ${cron_real}, daemonize: ${daemonize}, running: ${service_running}"
|
||||
)
|
||||
|
||||
cron { puppetrun:
|
||||
cron { 'puppetrun':
|
||||
command => "/usr/local/sbin/puppetd_run.sh",
|
||||
user => root,
|
||||
minute => $run_minute,
|
||||
@@ -78,7 +77,7 @@ class puppet (
|
||||
ensure => "${ensure}",
|
||||
}
|
||||
|
||||
case $kernel {
|
||||
case $::kernel {
|
||||
"Darwin" : {
|
||||
file { "/Library/LaunchDaemons/org.macports.puppet.plist":
|
||||
source => "puppet:///modules/puppet/org.macports.puppet.plist",
|
||||
@@ -89,22 +88,24 @@ class puppet (
|
||||
: ensure => "absent", }
|
||||
}
|
||||
"Linux" : {
|
||||
replace { "enable_puppet":
|
||||
file => "/etc/default/puppet",
|
||||
pattern => "START=no",
|
||||
replacement => "START=yes",
|
||||
before => Service["${puppet_service}"],
|
||||
}
|
||||
# replace { "enable_puppet":
|
||||
# file => "/etc/default/puppet",
|
||||
# pattern => "START=no",
|
||||
# replacement => "START=yes",
|
||||
# before => Service["${puppet_service}"],
|
||||
# }
|
||||
|
||||
monit::process { "puppet":
|
||||
start => "/etc/init.d/puppet start",
|
||||
stop => "/etc/init.d/puppet stop",
|
||||
pidfile => "/var/run/puppet/agent.pid",
|
||||
additional => "if totalmem > 400 Mb for 10 cycles then RESTART",
|
||||
ensure => $daemonize ? {
|
||||
"true" => "present",
|
||||
default => "absent",
|
||||
},
|
||||
if defined(Class['monit']) {
|
||||
monit::process { "puppet":
|
||||
start => "/etc/init.d/puppet start",
|
||||
stop => "/etc/init.d/puppet stop",
|
||||
pidfile => "/var/run/puppet/agent.pid",
|
||||
additional => "if totalmem > 400 Mb for 10 cycles then RESTART",
|
||||
ensure => $daemonize ? {
|
||||
"true" => "present",
|
||||
default => "absent",
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,4 +130,4 @@ class puppet (
|
||||
# require => [ Package["puppet"] ],
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user