Sha256: 048cd346dda0fc6cbe20b954291476d7e7380ff8c3e76a04df2d7327691b88c0

Contents?: true

Size: 1.12 KB

Versions: 80

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 2> /dev/null || true
        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
      rsudo "service munin-node start"
    end
    
    desc "Stop munin system monitoring"
    task :stop do
      rsudo "service munin-node stop; exit 0"
    end
    
    desc "Restart munin system monitoring"
    task :restart do
      stop
      start
    end
  
  end

end

Version data entries

80 entries across 40 versions & 6 rubygems

Version Path
rubber-1.15.0 lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.15.0 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.14.1 lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.14.1 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.14.0 lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.14.0 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.13.2 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.13.2 lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.13.1 lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.13.1 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.13.0 lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.13.0 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.12.2 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.12.2 lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.12.1 lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.12.1 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.12.0 lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.12.0 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.11.0 lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb
rubber-1.11.0 generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb