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
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 |
# File 'lib/pe_build/cap/run_install/posix.rb', line 22 def self.run_install(machine, installer_path, answers, **) if .fetch(:use_pem, false) on_machine(machine, "DISABLE_ANALYTICS=1 #{installer_path}/puppet-enterprise-installer -c #{answers}") else on_machine(machine, "#{installer_path}/puppet-enterprise-installer -a #{answers}") end # Update GPG key used by pe_repo. if .fetch(:update_gpg, false) machine.ui.info I18n.t('pebuild.cap.run_install.updating_pe_repo_gpg_key') on_machine(machine, <<-EOS) if [ -e #{installer_path}/gpg/GPG-KEY-puppetlabs ]; then if [ -e /opt/puppetlabs/puppet/modules/pe_repo ]; then cp #{installer_path}/gpg/GPG-KEY-puppetlabs /opt/puppetlabs/puppet/modules/pe_repo/files/GPG-KEY-puppetlabs elif [ -e /opt/puppet/share/puppet/modules/pe_repo ]; then cp #{installer_path}/gpg/GPG-KEY-puppetlabs /opt/puppet/share/puppet/modules/pe_repo/files/GPG-KEY-puppetlabs fi fi EOS 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 |