Skip to content

Commit 6f6f665

Browse files
authored
Merge pull request #111 from nwops/status_fix
Fix #110 - peadm::status plan fails with new bolt version
2 parents 4457aac + 47b94c5 commit 6f6f665

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

plans/status.pp

+5-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
) {
1717
$results = run_task('peadm::infrastatus', $targets, { format => 'json'})
1818
# returns the data in a hash
19-
$stack_status = $results.to_data.reduce({}) | $res, $item | {
20-
$data = $item[result][output] # parsed output of each target
21-
$res.merge({ $item[target] => peadm::determine_status($data, $colors).merge(stack_name => $item[target] ) })
19+
$stack_status = $results.reduce({}) | $res, $item | {
20+
$data = $item.value[output]
21+
$stack_name = $item.target.name
22+
$status = peadm::determine_status($data, $colors).merge(stack_name => $stack_name )
23+
$res.merge({ $stack_name => $status })
2224
}
2325

2426
$overall_degraded_stacks = $stack_status.filter | $item | { $item[1][status] =~ /degraded/ }
File renamed without changes.

0 commit comments

Comments
 (0)