Puppet Plan: ora_config::extract_as_node
- Defined in:
- plans/extract_as_node.pp
Overview
See the file “LICENSE” for the full license governing this code.
--
–++–
6 7 8 9 10 11 12 13 14 15 16 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 |
# File 'plans/extract_as_node.pp', line 6
plan ora_config::extract_as_node(
TargetSpec $target,
String[1] $sid,
String[1] $oracle_home,
String[1] $output_file,
Sensitive $system_password,
Sensitive $sys_password,
Sensitive $os_user_password,
String[1] $role = 'ora_profile::extracted_database',
String[1] $patch_level = 'NONE',
String[1] $version = '19.0.0.0',
String[1] $database_type = 'EE',
String[1] $os_user = 'oracle',
Boolean $cdb = false,
Boolean $pluggable = false,
String $contained_by = '',
) {
$result = run_task('ora_config::extract', $target,
sid => $sid,
oracle_home => $oracle_home,
os_user => $os_user,
cdb => $cdb,
pluggable => $pluggable,
contained_by => $contained_by,
system_password => $system_password.unwrap,
sys_password => $sys_password.unwrap,
os_user_password => $os_user_password.unwrap,
)
$config = {
'role' => $role,
'ora_profile::database::db_patches' => $patch_level,
'ora_profile::database::dbname' => $sid,
'ora_profile::database::version' => $version,
'ora_profile::database::db_software::database_type' => $database_type,
'ora_profile::database::oracle_home' => "/u01/app/oracle/product/%{lookup('ora_profile::database::version')}/db_home1",
'ora_profile::database::oracle_base' => '/u01/app/oracle',
}
$data =$config + $result.first.value['resources']
easy_type::write_yaml($output_file, $data)
out::message("Write data to ${output_file}")
}
|