Class: RightConf::PackagesConfigurator

Inherits:
Object
  • Object
show all
Includes:
Configurator
Defined in:
lib/rconf/configurators/packages_configurator.rb

Instance Method Summary collapse

Methods included from Configurator

#[], included, #post_process, #run, #signature, #validate

Methods included from ProgressReporter

included, report_to_file, report_to_stdout

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RightConf::Configurator

Instance Method Details

#run_darwinObject

Use brew on Mac OS X

Return

true

Always return true



68
69
70
# File 'lib/rconf/configurators/packages_configurator.rb', line 68

def run_darwin
  # TBD, check brew is installed then use
end

#run_linux_centosObject Also known as: run_linux_redhat

Install yum packages

Return

true

Always return true



46
47
48
49
50
51
52
53
# File 'lib/rconf/configurators/packages_configurator.rb', line 46

def run_linux_centos
  return if centos.nil?
  report_check("Installing the following packages:\n#{centos.join(' ')}\nThis could take a while")
  opts = centos.dup
  opts << { :abort_on_failure => 'Failed to install packages' } if abort_on_failure
  Command.execute('sudo', 'yum', 'install', '-y', *opts)
  report_success
end

#run_linux_ubuntuObject Also known as: run_linux_debian

Install debian packages

Return

true

Always return true



32
33
34
35
36
37
38
39
# File 'lib/rconf/configurators/packages_configurator.rb', line 32

def run_linux_ubuntu
  return if debian.nil?
  report_check("Installing the following packages:\n#{debian.join(' ')}\nThis could take a while")
  opts = debian.dup 
  opts << { :abort_on_failure => 'Failed to install packages' } if abort_on_failure
  Command.execute('sudo', 'apt-get', 'install', '-y', *opts)
  report_success
end

#run_windowsObject

Install Windows software

Return

true

Always return true



60
61
62
# File 'lib/rconf/configurators/packages_configurator.rb', line 60

def run_windows
  # TBD
end