Sha256: 70579809902d64d4a92cb410279a1f8796dd427e681426498d21a2b7e354b176

Contents?: true

Size: 1.12 KB

Versions: 3

Compression:

Stored size: 1.12 KB

Contents

namespace :rubber do
  
  namespace :munin do
  
    rubber.allow_optional_tasks(self)

    after "rubber:install_packages", "rubber:munin:custom_install"

    # sometimes apt-get install of munin doesn't end up configuring
    # plugins (e.g. installing postfix at same time, postfix plugin
    # configure barfs as postfix not configured yet)
    desc <<-DESC
      Reconfigures munin
    DESC
    task :custom_install do
      rubber.sudo_script 'setup_munin_plugins', <<-ENDSCRIPT
        munin-node-configure --shell --remove-also > /tmp/setup-munin-plugins
        sh /tmp/setup-munin-plugins
      ENDSCRIPT
      restart
    end

    # after "deploy:stop", "rubber:munin:stop"
    # before "deploy:start", "rubber:munin:start"
    # after "deploy:restart", "rubber:munin:restart"

    desc "Start munin system monitoring"
    task :start do
      sudo "/etc/init.d/munin-node start"
    end
    
    desc "Stop munin system monitoring"
    task :stop, :on_error => :continue do
      sudo "/etc/init.d/munin-node stop"
    end
    
    desc "Restart munin system monitoring"
    task :restart do
      stop
      start
    end
  
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubber-1.3.2 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.3.1 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.3.0 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb