diff options
Diffstat (limited to 'random_crontab_minutes.rb')
-rw-r--r-- | random_crontab_minutes.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/random_crontab_minutes.rb b/random_crontab_minutes.rb index b3fb544..8ab29e1 100644 --- a/random_crontab_minutes.rb +++ b/random_crontab_minutes.rb @@ -2,14 +2,16 @@ # random_crontab_minutes.rb # -require 'md5' - module Puppet::Parser::Functions - newfunction(:random_crontab_minutes, :type => :rvalue) do |arguments| + newfunction(:random_crontab_minutes, :type => :rvalue, :doc => <<-EOS + EOS + ) do |arguments| raise(Puppet::ParseError, "Wrong number of arguments " + "given (#{arguments.size} for 2)") if arguments.size < 2 + require 'md5' + job_name = arguments[0] host = arguments[1] @@ -23,7 +25,7 @@ module Puppet::Parser::Functions value = value < 60 ? value : 59 return value - end # def newfunction -end # module Puppet::Parser::Functions + end +end # vim: set ts=2 sw=2 et : |