refactoring, part 1

This commit is contained in:
Udo Waechter
2014-05-26 13:03:17 +02:00
parent fcd9506f20
commit a4e9e691b4
8 changed files with 79 additions and 58 deletions

View File

@@ -1,4 +1,4 @@
import 'defines/*.pp'
#import 'defines/*.pp'
class puppet (
$ensure = 'present',
@@ -16,7 +16,7 @@ class puppet (
}
$factpath = '/var/lib/puppet/lib/facter'
require 'puppet::common'
require 'puppet::facter'
if !defined(Class['puppet::puppetlabs_apt']) {
require 'puppet::puppetlabs_apt'
@@ -111,31 +111,20 @@ class puppet (
},
}
}
if defined(Class['ganglia::monitor']) {
Ganglia::Gmetric::Cron {
source => 'puppet/ganglia',
ensure => $ensure,
}
ganglia::gmetric::cron { 'puppetd_lastrun.sh': runwhen => '5'; 'puppetd_runtime.sh': runwhen => '15'; }
}
}
}
$puppet_user = $operatingsystem ? {
$puppet_user = $::operatingsystem ? {
'Darwin' => $adm,
default => 'puppet',
}
$puppet_group = $operatingsystem ? {
$puppet_group = $::operatingsystem ? {
'Darwin' => 'wheel',
default => 'puppet',
}
# 'FreeBSD' => '/usr/local/etc/puppet/puppet.conf',
$puppetconf = $operatingsystem ? {
$puppetconf = $::operatingsystem ? {
default => '/etc/puppet/puppet.conf',
}
file { $puppetconf:
ensure => $ensure,
content => template('puppet/puppet.conf.erb'),