Skip to content

Commit 8a7fd69

Browse files
committed
move cron command to class parameter
1 parent be20df3 commit 8a7fd69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

manifests/agent.pp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# ['version'] - The version of the puppet agent to install
1111
# ['puppet_run_style'] - The run style of the agent either 'service', 'cron', 'external' or 'manual'
1212
# ['puppet_run_interval'] - The run interval of the puppet agent in minutes, default is 30 minutes
13+
# ['puppet_run_command'] - The command that will be executed for puppet agent run
1314
# ['user_id'] - The userid of the puppet user
1415
# ['group_id'] - The groupid of the puppet group
1516
# ['splay'] - If splay should be enable defaults to false
@@ -48,6 +49,7 @@
4849
$version = 'present',
4950
$puppet_run_style = 'service',
5051
$puppet_run_interval = 30,
52+
$puppet_run_command = '/usr/bin/puppet agent --no-daemonize --onetime --logdest syslog > /dev/null 2>&1',
5153
$user_id = undef,
5254
$group_id = undef,
5355
$splay = false,
@@ -128,7 +130,7 @@
128130
$time2 = fqdn_rand($puppet_run_interval) + 30
129131

130132
cron { 'puppet-client':
131-
command => '/usr/bin/puppet agent --no-daemonize --onetime --logdest syslog > /dev/null 2>&1',
133+
command => $puppet_run_command,
132134
user => 'root',
133135
# run twice an hour, at a random minute in order not to collectively stress the puppetmaster
134136
hour => '*',

0 commit comments

Comments
 (0)