Class: Ridley::CommandContext::UnixUninstall

Inherits:
Unix
  • Object
show all
Defined in:
lib/ridley/command_context/unix_uninstall.rb

Overview

Context class for generating an uninstall command for Unix based OSes

Instance Attribute Summary collapse

Attributes inherited from Unix

#sudo

Instance Method Summary collapse

Methods inherited from Unix

#command

Methods inherited from Base

command, #command, template_file

Constructor Details

#initialize(options = {}) ⇒ UnixUninstall

Returns a new instance of UnixUninstall.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :skip_chef (Boolena) — default: false

    skip removal of the Chef package and the contents of the installation directory. Setting this to true will only remove any data and configurations generated by running Chef client.



14
15
16
17
18
# File 'lib/ridley/command_context/unix_uninstall.rb', line 14

def initialize(options = {})
  super(options)
  options    = options.reverse_merge(skip_chef: false)
  @skip_chef = options[:skip_chef]
end

Instance Attribute Details

#skip_chefBoolean (readonly)

Returns:

  • (Boolean)


8
9
10
# File 'lib/ridley/command_context/unix_uninstall.rb', line 8

def skip_chef
  @skip_chef
end

Instance Method Details

#config_directoryString

The path to the Chef configuration directory on the target host

Returns:

  • (String)


23
24
25
# File 'lib/ridley/command_context/unix_uninstall.rb', line 23

def config_directory
  "/etc/chef"
end

#data_directoryString

The path to the Chef data directory on the target host

Returns:

  • (String)


30
31
32
# File 'lib/ridley/command_context/unix_uninstall.rb', line 30

def data_directory
  "/var/chef"
end

#install_directoryString

The path to the Omnibus Chef installation on the target host

Returns:

  • (String)


37
38
39
# File 'lib/ridley/command_context/unix_uninstall.rb', line 37

def install_directory
  "/opt/chef"
end