cron can also be disabled
This commit is contained in:
@@ -8,7 +8,8 @@ class puppet::agent (
|
|||||||
$run_if_ipmatch = undef,
|
$run_if_ipmatch = undef,
|
||||||
$maxsleep = '3200',
|
$maxsleep = '3200',
|
||||||
$puppet_master = undef,
|
$puppet_master = undef,
|
||||||
$environment = gsub($::domain,'.lan', '')) {
|
$cron = true,
|
||||||
|
$environment = gsub($::domain, '.lan', '')) {
|
||||||
case $::kernel {
|
case $::kernel {
|
||||||
'Linux' : {
|
'Linux' : {
|
||||||
$puppetpkgs = ['puppet', 'puppet-common']
|
$puppetpkgs = ['puppet', 'puppet-common']
|
||||||
@@ -44,7 +45,10 @@ class puppet::agent (
|
|||||||
ensure => $daemonize,
|
ensure => $daemonize,
|
||||||
}
|
}
|
||||||
$cron_real = $daemonize ? {
|
$cron_real = $daemonize ? {
|
||||||
false => 'present',
|
false => $cron ? {
|
||||||
|
true => 'present',
|
||||||
|
default => 'absent',
|
||||||
|
},
|
||||||
true => 'absent',
|
true => 'absent',
|
||||||
default => $ensure,
|
default => $ensure,
|
||||||
}
|
}
|
||||||
@@ -81,6 +85,7 @@ class puppet::agent (
|
|||||||
setting => 'splay',
|
setting => 'splay',
|
||||||
value => $maxsleep;
|
value => $maxsleep;
|
||||||
}
|
}
|
||||||
|
|
||||||
ini_setting { 'puppet-agent-env':
|
ini_setting { 'puppet-agent-env':
|
||||||
setting => 'environment',
|
setting => 'environment',
|
||||||
value => $environment;
|
value => $environment;
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
class puppet (
|
class puppet (
|
||||||
$ensure = 'present',
|
$ensure = 'present',
|
||||||
$version = undef,
|
$version = undef,
|
||||||
$agent = true,
|
$agent = true,
|
||||||
$server = false,
|
$server = false,
|
||||||
$facter_version = $ensure,
|
$facter_version = $ensure,
|
||||||
|
$agent_cron = true,
|
||||||
$puppetlabs_apt = true,
|
$puppetlabs_apt = true,
|
||||||
$agent_norunifloggedin = false,
|
$agent_norunifloggedin = false,
|
||||||
$agent_daemonize = true,
|
$agent_daemonize = true,
|
||||||
@@ -49,7 +50,8 @@ 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
|
maxsleep => $agent_max_sleep,
|
||||||
|
cron => $agent_cron,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user