Puppet Plan: ora_install::opatch_upgrade
- Defined in:
- plans/opatch_upgrade.pp
Summary
This plan will install a new version of OPatch in specified ORACLE_HOME.Overview
See the file “LICENSE” for the full license governing this code.
--
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'plans/opatch_upgrade.pp', line 44
plan ora_install::opatch_upgrade(
TargetSpec $dbserver,
Stdlib::Absolutepath $oracle_home = undef,
String[1] $patch_file = undef,
Optional[Integer] $csi_number = undef,
Optional[String[1]] $support_id = undef,
String[1] $opversion = undef,
String[1] $user = 'oracle',
String[1] $group = 'dba',
Stdlib::Absolutepath $download_dir = '/install',
Optional[String[1]] $puppet_download_mnt_point = undef,
Optional[Enum['json','pretty']] $format = 'pretty',
) {
if get_targets($dbserver).length > 1 {
fail_plan("${dbserver} did not resolve to a single target")
}
$dbserver.apply_prep
$result = apply($dbserver, { required_modules => ['easy_type', 'ora_install'], '_catch_errors' => true }) {
ora_install::opatchupgrade { "opatch_upgrade_${oracle_home}_${opversion}":
oracle_home => $oracle_home,
patch_file => $patch_file,
csi_number => $csi_number,
support_id => $support_id,
opversion => $opversion,
user => $user,
group => $group,
download_dir => $download_dir,
puppet_download_mnt_point => $puppet_download_mnt_point,
}
}
$target_result = $result.first()
if $target_result.error {
fail_plan($target_result.error())
} else {
$target_result.report['logs'].each |$log| {
out::message("${log['source']}: ${log['message']}")
}
}
}
|