splay is not numeric any more

This commit is contained in:
Udo Waechter
2015-01-13 17:26:17 +01:00
parent 340bdf611c
commit 9fdfc7cf76
3 changed files with 13 additions and 13 deletions

View File

@@ -6,8 +6,8 @@ class puppet::agent (
$run_hour = '*/1',
$run_minute = '10',
$run_if_ipmatch = undef,
$maxsleep = '3200',
$puppet_master = undef,
$splay = true,
$cron = true,
$environment = gsub($::domain, '.(lan|mysportgroup\.de)', '')) {
case $::kernel {
@@ -46,13 +46,13 @@ class puppet::agent (
}
$cron_real = $daemonize ? {
false => $cron ? {
true => 'present',
true => 'present',
default => 'absent',
},
true => 'absent',
default => $ensure,
}
cron { 'puppetrun':
command => '/usr/local/sbin/puppetd_run.sh',
user => 'root',
@@ -83,7 +83,7 @@ class puppet::agent (
ini_setting { 'puppet-agent-splay':
setting => 'splay',
value => $maxsleep;
value => $splay;
}
ini_setting { 'puppet-agent-env':

View File

@@ -1,17 +1,17 @@
class puppet (
$ensure = 'present',
$version = undef,
$agent = true,
$server = false,
$ensure = 'present',
$version = undef,
$agent = true,
$server = false,
$facter_version = $ensure,
$agent_cron = true,
$agent_cron = true,
$puppetlabs_apt = true,
$agent_norunifloggedin = false,
$agent_daemonize = true,
$agent_run_hour = '*/1',
$agent_run_minute = '10',
$agent_run_if_ipmatch = '',
$agent_maxsleep = '3200',
$agent_splay = true,
$server_dns_alt_names = undef,
$server_storeconfigs = false,
$server_storeconfigs_backend = undef,
@@ -50,7 +50,7 @@ class puppet (
daemonize => $agent_daemonize,
run_hour => $agent_run_hour,
run_if_ipmatch => $agent_run_if_ipmatch,
maxsleep => $agent_max_sleep,
splay => $agent_splay,
cron => $agent_cron,
}
}

View File

@@ -53,7 +53,7 @@ if [ ${ISUNIIP} -gt 0 ]; then
fi
fi
MAXSLEEP=<%= @maxsleep %> #How many seconds to wait maximally
#MAXSLEEP=<%= @maxsleep %> #How many seconds to wait maximally
SLEEP=${RANDOM}
I=${RANDOM}
@@ -63,7 +63,7 @@ if [ ${ISUNIIP} -gt 0 ]; then
SLEEP=${RANDOM}
done
# wait maximally $MAXSLEEP seconds
sleep $(expr ${SLEEP} % ${MAXSLEEP})
#sleep $(expr ${SLEEP} % ${MAXSLEEP})
# run puppetd
nice -n 12 $PUPPET agent -t 2&>>/var/log/puppet/puppetd_run.log
fi