Class: PEBuild::Provisioner::PEBootstrap
- Inherits:
-
Object
- Object
- PEBuild::Provisioner::PEBootstrap
- Defined in:
- lib/pe_build/provisioner/pe_bootstrap.rb
Defined Under Namespace
Classes: AgentRoleRemovedError, 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.
41 42 43 44 45 46 47 48 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 41 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.
35 36 37 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 35 def answer_dir @answer_dir end |
#answer_file ⇒ Object (readonly)
Returns the value of attribute answer_file.
39 40 41 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 39 def answer_file @answer_file end |
#work_dir ⇒ Object (readonly)
Returns the value of attribute work_dir.
31 32 33 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 31 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.
54 55 56 57 58 59 60 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 54 def configure(root_config) late_config_merge(root_config) unless File.directory? work_dir FileUtils.mkdir_p work_dir end end |
#provision ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/pe_build/provisioner/pe_bootstrap.rb', line 62 def provision load_archive if pe_installed? machine.ui.warn I18n.t('pebuild.provisioner.pe_bootstrap.already_installed'), :name => machine.name else prepare_answers_file fetch_installer run_install run_postinstall_tasks end end |