Sha256: a1a9fdf1180f591e9af965a0d58a3fbac88cf91f04a7db5e3005ac8c0c778e6c

Contents?: true

Size: 1.75 KB

Versions: 63

Compression:

Stored size: 1.75 KB

Contents

# Copyright 2006-2009 by Mike Bailey. All rights reserved.
Capistrano::Configuration.instance(:must_exist).load do 
  namespace :deprec do 
    namespace :syslog do
      
      set(:syslog_server) { Capistrano::CLI.ui.ask 'Enter Syslog server hostname' }

      desc "Install syslog"
      task :install do
        install_deps
      end

      # install dependencies for sysklogd
      task :install_deps do
        apt.install( {:base => %w(sysklogd)}, :stable )
      end
      
      SYSTEM_CONFIG_FILES[:syslog] =  [
        
       { :template => 'syslog.conf.erb',
         :path => '/etc/syslog.conf',
         :mode => 0644,
         :owner => 'root:root'},

       { :template => 'syslogd.erb',
         :path => '/etc/default/syslogd',
         :mode => 0644,
         :owner => 'root:root'}
         
      ]
           
      desc "Generate Syslog configs"
      task :config_gen do
        SYSTEM_CONFIG_FILES[:syslog].each do |file|
         deprec2.render_template(:syslog, file)
        end
      end

      desc "Push Syslog config files to server"
      task :config, :roles => :all_hosts, :except => {:syslog_master => true} do
        deprec2.push_configs(:syslog, SYSTEM_CONFIG_FILES[:syslog])
        restart
      end

      desc "Start Syslog"
      task :start, :roles => :all_hosts, :except => { :syslog_master => true } do
        run "#{sudo} /etc/init.d/sysklogd start"
      end
      
      desc "Stop Syslog"
      task :stop, :roles => :all_hosts, :except => { :syslog_master => true } do
        run "#{sudo} /etc/init.d/sysklogd stop"
      end
      
      desc "Restart Syslog"
      task :restart, :roles => :all_hosts, :except => { :syslog_master => true } do
        run "#{sudo} /etc/init.d/sysklogd restart"
      end

    end 
    
  end
end

Version data entries

63 entries across 63 versions & 3 rubygems

Version Path
le1t0-deprec-2.1.6.014 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.013 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.012 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.011 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.010 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.009 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.008 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.007 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.006 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.005 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.004 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.003 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.002 lib/deprec/recipes/syslog.rb
le1t0-deprec-2.1.6.001 lib/deprec/recipes/syslog.rb
deprec-2.1.5 lib/deprec/recipes/syslog.rb
visfleet-deprec-2.1.4.5 lib/deprec/recipes/syslog.rb
visfleet-deprec-2.1.4.4 lib/deprec/recipes/syslog.rb
visfleet-deprec-2.1.4.3 lib/deprec/recipes/syslog.rb
visfleet-deprec-2.1.4.2 lib/deprec/recipes/syslog.rb
visfleet-deprec-2.1.4.1 lib/deprec/recipes/syslog.rb