Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Commit

Permalink
Added Task_Timeout variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ebouliane committed Mar 17, 2016
1 parent eed3d81 commit 27e57e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
# - Command to execute
# check_file (String: default [/tmp/pp.scheduled-reboot])
# - The check file that is created with Start DateTime added to the end.
# task_timeout (Integer: default [0])
# - 0 has no timeout, X timeout in seconds
#
class scheduled_runonce (
$class_enabled = true,
$datetime_start = '2012-06-10 12:53:00',
$datetime_end = '2012-06-10 12:53:59',
$command_var = '/sbin/shutdown -ra now',
$check_file_prefix = '/tmp/pp.scheduled-runonce',
$task_timeout = 0,
) {
# Verify if target host is Linux
if $::kernel == 'Linux' {
Expand All @@ -41,6 +44,7 @@
user => root,
onlyif => "/usr/bin/test ! -f ${check_file}",
path => ['/usr/bin','/sbin','/bin'],
timeout => $task_timeout,
}
notice("Reboot command will run. ${command_string}")
} else {
Expand Down

0 comments on commit 27e57e1

Please sign in to comment.