Class: PEBuild::Provisioner::PEBootstrap

Inherits:
Object
  • Object
show all
Defined in:
lib/pe_build/provisioner/pe_bootstrap.rb

Defined Under Namespace

Classes: AnswersFile, PostInstall

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(machine, config) ⇒ PEBootstrap

Returns a new instance of PEBootstrap.



29
30
31
32
33
34
35
36
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 29

def initialize(machine, config)
  super

  @logger = Log4r::Logger.new('vagrant::provisioners::pe_bootstrap')

  @work_dir   = File.join(@machine.env.root_path.join, PEBuild::WORK_DIR)
  @answer_dir = File.join(work_dir, 'answers')
end

Instance Attribute Details

#answer_dirObject (readonly)

Returns the value of attribute answer_dir.



23
24
25
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 23

def answer_dir
  @answer_dir
end

#answer_fileObject (readonly)

Returns the value of attribute answer_file.



27
28
29
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 27

def answer_file
  @answer_file
end

#work_dirObject (readonly)

Returns the value of attribute work_dir.



19
20
21
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 19

def work_dir
  @work_dir
end

Instance Method Details

#configure(root_config) ⇒ void

This method returns an undefined value.

Instantiate all working directory content and stage the PE installer.

Parameters:

  • root_config (Object)

    ???



42
43
44
45
46
47
48
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 42

def configure(root_config)
  late_config_merge(root_config)

  unless File.directory? work_dir
    FileUtils.mkdir_p work_dir
  end
end

#provisionObject



50
51
52
53
54
55
56
57
58
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 50

def provision
  prepare_answers_file
  load_archive
  fetch_installer

  @machine.guest.capability('run_install', @config, @archive)

  run_postinstall_tasks
end