splay is not numeric any more
This commit is contained in:
@@ -6,8 +6,8 @@ class puppet::agent (
|
|||||||
$run_hour = '*/1',
|
$run_hour = '*/1',
|
||||||
$run_minute = '10',
|
$run_minute = '10',
|
||||||
$run_if_ipmatch = undef,
|
$run_if_ipmatch = undef,
|
||||||
$maxsleep = '3200',
|
|
||||||
$puppet_master = undef,
|
$puppet_master = undef,
|
||||||
|
$splay = true,
|
||||||
$cron = true,
|
$cron = true,
|
||||||
$environment = gsub($::domain, '.(lan|mysportgroup\.de)', '')) {
|
$environment = gsub($::domain, '.(lan|mysportgroup\.de)', '')) {
|
||||||
case $::kernel {
|
case $::kernel {
|
||||||
@@ -83,7 +83,7 @@ class puppet::agent (
|
|||||||
|
|
||||||
ini_setting { 'puppet-agent-splay':
|
ini_setting { 'puppet-agent-splay':
|
||||||
setting => 'splay',
|
setting => 'splay',
|
||||||
value => $maxsleep;
|
value => $splay;
|
||||||
}
|
}
|
||||||
|
|
||||||
ini_setting { 'puppet-agent-env':
|
ini_setting { 'puppet-agent-env':
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class puppet (
|
|||||||
$agent_run_hour = '*/1',
|
$agent_run_hour = '*/1',
|
||||||
$agent_run_minute = '10',
|
$agent_run_minute = '10',
|
||||||
$agent_run_if_ipmatch = '',
|
$agent_run_if_ipmatch = '',
|
||||||
$agent_maxsleep = '3200',
|
$agent_splay = true,
|
||||||
$server_dns_alt_names = undef,
|
$server_dns_alt_names = undef,
|
||||||
$server_storeconfigs = false,
|
$server_storeconfigs = false,
|
||||||
$server_storeconfigs_backend = undef,
|
$server_storeconfigs_backend = undef,
|
||||||
@@ -50,7 +50,7 @@ class puppet (
|
|||||||
daemonize => $agent_daemonize,
|
daemonize => $agent_daemonize,
|
||||||
run_hour => $agent_run_hour,
|
run_hour => $agent_run_hour,
|
||||||
run_if_ipmatch => $agent_run_if_ipmatch,
|
run_if_ipmatch => $agent_run_if_ipmatch,
|
||||||
maxsleep => $agent_max_sleep,
|
splay => $agent_splay,
|
||||||
cron => $agent_cron,
|
cron => $agent_cron,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ if [ ${ISUNIIP} -gt 0 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MAXSLEEP=<%= @maxsleep %> #How many seconds to wait maximally
|
#MAXSLEEP=<%= @maxsleep %> #How many seconds to wait maximally
|
||||||
SLEEP=${RANDOM}
|
SLEEP=${RANDOM}
|
||||||
I=${RANDOM}
|
I=${RANDOM}
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ if [ ${ISUNIIP} -gt 0 ]; then
|
|||||||
SLEEP=${RANDOM}
|
SLEEP=${RANDOM}
|
||||||
done
|
done
|
||||||
# wait maximally $MAXSLEEP seconds
|
# wait maximally $MAXSLEEP seconds
|
||||||
sleep $(expr ${SLEEP} % ${MAXSLEEP})
|
#sleep $(expr ${SLEEP} % ${MAXSLEEP})
|
||||||
# run puppetd
|
# run puppetd
|
||||||
nice -n 12 $PUPPET agent -t 2&>>/var/log/puppet/puppetd_run.log
|
nice -n 12 $PUPPET agent -t 2&>>/var/log/puppet/puppetd_run.log
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user