Class: PEBuild::Cap::RunInstall::POSIX
- Inherits:
-
Object
- Object
- PEBuild::Cap::RunInstall::POSIX
- Extended by:
- OnMachine
- Defined in:
- lib/pe_build/cap/run_install/posix.rb
Class Method Summary collapse
-
.run_install(machine, installer_path, answers, **options) ⇒ void
Run the PE installer on POSIX systems.
Methods included from OnMachine
Class Method Details
.run_install(machine, installer_path, answers, **options) ⇒ void
This method returns an undefined value.
Run the PE installer on POSIX systems
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/pe_build/cap/run_install/posix.rb', line 17 def self.run_install(machine, installer_path, answers, **) if .fetch(:use_pem, false) # NOTE: Ensure symlinks exist since minitar doesn't create them. This # call will be reverted once the PEM changes are finalized. on_machine(machine, <<-EOS) pushd #{File.dirname(installer_path)} > /dev/null if [ -d pe-manager ] then pushd pe-manager > /dev/null ln -sf ../VERSION ../modules . pushd packages > /dev/null ln -sf ../../packages/* . fi EOS on_machine(machine, "#{installer_path} -c #{answers}") else # NOTE: Ensure symlinks exist since minitar doesn't create them. This # call will be reverted once the PEM changes are finalized. on_machine(machine, <<-EOS) pushd #{File.dirname(installer_path)} > /dev/null if [ -d legacy ] then pushd legacy > /dev/null for f in $(find . -type f -empty) do ln -sf ../$f $f done fi EOS on_machine(machine, "#{installer_path} -a #{answers}") end if machine.communicate.test('which at') machine.ui.info I18n.t('pebuild.cap.run_install.scheduling_run') machine.communicate.sudo("echo 'PATH=/opt/puppet/bin:/opt/puppetlabs/puppet/bin:$PATH puppet agent -t --waitforcert 10' | at now '+ 1min'") end end |