Class: PuppetX::EnterpriseModules::OraInstall::OpatchCommand
- Defined in:
- lib/puppet_x/enterprisemodules/ora_install/opatch_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 = {}) ⇒ OpatchCommand
constructor
A new instance of OpatchCommand.
Methods inherited from Command
Constructor Details
#initialize(options = {}) ⇒ OpatchCommand
Returns a new instance of OpatchCommand.
12 13 14 |
# File 'lib/puppet_x/enterprisemodules/ora_install/opatch_command.rb', line 12 def initialize( = {}) super(:opatch, ) end |
Instance Method Details
#execute(arguments, command_options) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/puppet_x/enterprisemodules/ora_install/opatch_command.rb', line 16 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, ) raise 'Opatch contained an error' unless value =~ /OPatch completed|OPatch succeeded|opatch auto succeeded|opatchauto succeeded/ value end |