Class: PEBuild::Provisioner::PEBootstrap
- Inherits:
-
Object
- Object
- PEBuild::Provisioner::PEBootstrap
- Defined in:
- lib/pe_build/provisioner/pe_bootstrap.rb
Defined Under Namespace
Classes: AnswersFile, PostInstall, UnsetVersionError
Instance Attribute Summary collapse
-
#answer_dir ⇒ Object
readonly
Returns the value of attribute answer_dir.
-
#answer_file ⇒ Object
readonly
Returns the value of attribute answer_file.
-
#work_dir ⇒ Object
readonly
Returns the value of attribute work_dir.
Instance Method Summary collapse
-
#configure(root_config) ⇒ void
Instantiate all working directory content and stage the PE installer.
-
#initialize(machine, config) ⇒ PEBootstrap
constructor
A new instance of PEBootstrap.
- #provision ⇒ Object
Constructor Details
#initialize(machine, config) ⇒ PEBootstrap
Returns a new instance of PEBootstrap.
36 37 38 39 40 41 42 43 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 36 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_dir ⇒ Object (readonly)
Returns the value of attribute answer_dir.
30 31 32 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 30 def answer_dir @answer_dir end |
#answer_file ⇒ Object (readonly)
Returns the value of attribute answer_file.
34 35 36 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 34 def answer_file @answer_file end |
#work_dir ⇒ Object (readonly)
Returns the value of attribute work_dir.
26 27 28 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 26 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.
49 50 51 52 53 54 55 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 49 def configure(root_config) late_config_merge(root_config) unless File.directory? work_dir FileUtils.mkdir_p work_dir end end |
#provision ⇒ Object
57 58 59 60 61 62 63 64 65 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 57 def provision prepare_answers_file load_archive fetch_installer @machine.guest.capability('run_install', @config, @archive) run_postinstall_tasks end |