Class: Ridley::CommandContext::WindowsUninstall

Inherits:
Windows
  • Object
show all
Defined in:
lib/ridley/command_context/windows_uninstall.rb

Overview

Context class for generating an uninstall command for Unix based OSes

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

command, #command, template_file

Constructor Details

#initialize(options = {}) ⇒ WindowsUninstall

Returns a new instance of WindowsUninstall.

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/windows_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/windows_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/windows_uninstall.rb', line 23

def config_directory
  "C:\\chef"
end

#install_directoryString

The path to the Omnibus Chef installation on the target host

Returns:

  • (String)


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

def install_directory
  "C:\\opscode\\chef"
end