Sha256: cd1ab46f81c3cf249cfc1051185d1765e41bdfe3ece8f4a07d544ce735c83f79

Contents?: true

Size: 679 Bytes

Versions: 9

Compression:

Stored size: 679 Bytes

Contents

namespace :monit do
  
  namespace :logrotate do
    
    desc <<-DESC
    Install logrotated conf for monit.
    
    <dl>
    <dt>monit_log_path</dt>
    <dd>Path to monit log</dd>
    <dd class="default">Defaults to @"/var/log/monit.log"@</dd>
    </dl>
    "Source":#{link_to_source(__FILE__)}    
    DESC
    task :install do
      
      fetch_or_default(:monit_log_path, "/var/log/monit.log")
      
      set :logrotate_name, "monit"
      set :logrotate_log_path, monit_log_path
      set :logrotate_options, [ { :rotate => 1, :size => "200k" },  :weekly, :missingok, :notifempty, :copytruncate ]
      
      logrotated.install_conf      
    end    
    
  end
  
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
calas-capitate-0.3.6 lib/recipes/logrotate/monit.rb
capitate-0.2.14 lib/recipes/logrotate/monit.rb
capitate-0.2.15 lib/recipes/logrotate/monit.rb
capitate-0.3.6 lib/recipes/logrotate/monit.rb
capitate-0.3.2 lib/recipes/logrotate/monit.rb
capitate-0.3.3 lib/recipes/logrotate/monit.rb
capitate-0.3.1 lib/recipes/logrotate/monit.rb
capitate-0.3.4 lib/recipes/logrotate/monit.rb
capitate-0.3.5 lib/recipes/logrotate/monit.rb