Skip to content

Commit ebf3164

Browse files
committed
add plan to list parameters used ad add it to install and upgrade plans
1 parent 255b974 commit ebf3164

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

plans/install.pp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@
7979

8080
peadm::assert_supported_pe_version($version, $permit_unsafe_versions)
8181

82+
# Log parameters for debugging
83+
peadm::log_plan_parameters({
84+
'targets' => $targets,
85+
'primary_host' => $primary_host,
86+
'mode' => $mode,
87+
'begin_at_step' => $begin_at_step,
88+
})
89+
8290
$install_result = run_plan('peadm::subplans::install',
8391
# Standard
8492
primary_host => $primary_host,

plans/upgrade.pp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@
7373
$compiler_hosts,
7474
)
7575

76+
# Log parameters for debugging
77+
peadm::log_plan_parameters({
78+
'targets' => $targets,
79+
'primary_host' => $primary_host,
80+
'mode' => $mode,
81+
'begin_at_step' => $begin_at_step,
82+
})
83+
7684
# Convert inputs into targets.
7785
$primary_target = peadm::get_targets($primary_host, 1)
7886
$replica_target = peadm::get_targets($replica_host, 1)

plans/util/log_plans_params.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function peadm::log_plan_parameters(Hash $params) {
2+
$params.each |$key, $value| {
3+
out::message("Parameter '${key}': [${value}]")
4+
}
5+
}

0 commit comments

Comments
 (0)