Class: PuppetX::EnterpriseModules::OraInstall::OpatchautoCommand
- Defined in:
- lib/puppet_x/enterprisemodules/ora_install/opatchauto_command.rb
Overview
docs
Constant Summary
Constants inherited from Command
Command::DEFAULT_TIMEOUT, Command::VALID_OPTIONS
Instance Method Summary collapse
- #execute(arguments, command_options) ⇒ Object
-
#initialize(options = {}) ⇒ OpatchautoCommand
constructor
A new instance of OpatchautoCommand.
Methods inherited from Command
Constructor Details
#initialize(options = {}) ⇒ OpatchautoCommand
Returns a new instance of OpatchautoCommand.
11 12 13 |
# File 'lib/puppet_x/enterprisemodules/ora_install/opatchauto_command.rb', line 11 def initialize( = {}) super(:opatchauto, ) end |
Instance Method Details
#execute(arguments, command_options) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/puppet_x/enterprisemodules/ora_install/opatchauto_command.rb', line 15 def execute(arguments, ) = { :failonfail => true, :combine => true } value = '' command = command_string(arguments, ) Puppet.debug "Executing #{@command} command: #{arguments} as #{os_user}" value = Puppet::Util::Execution.execute(command, ) # Add 2 minutes sleep because opatchauto doesn't always wait until everything is running (maybe only in =<12.2?) sleep 120 raise 'Opatch contained an error' unless value =~ /OPatch completed|OPatch succeeded|opatch auto succeeded|opatchauto succeeded|OPatchAuto successful/ value end |