|
56 | 56 |
|
57 | 57 | # get nodes that are 'clean' from health check results |
58 | 58 | $nodes_to_patch = ($health_checks.filter_set |$item| { $item.value['state'] == 'clean' }).map |$n| { $n.target } |
59 | | - $health_check_failed = ($health_checks.filter_set |$item| { $item.status == 'failure' }).map |$n| { $n.name }.sort |
| 59 | + $health_check_failed = ($health_checks.filter_set |$item| { $item.status == 'failure' }).names |
60 | 60 |
|
61 | 61 | if $debug { |
62 | 62 | out::message('patch_batch.pp: Nodes to patch after health check:') |
|
85 | 85 | out::message($patching_result) |
86 | 86 | } |
87 | 87 |
|
88 | | - $no_patches = $patching_result.ok_set.filter |$item| { |
89 | | - $item.value['packages_updated'].empty |
90 | | - }.map |$n| { $n.name }.sort |
91 | | - |
92 | | - $with_patches = $patching_result.ok_set.filter |$item| { |
93 | | - ! $item.value['packages_updated'].empty |
94 | | - }.map |$n| { $n.name }.sort |
95 | | - |
96 | | - $reboot_required = $patching_result.ok_set.filter |$item| { |
97 | | - $item.value['reboot_required'] == true |
98 | | - }.map |$n| { $n.name }.sort |
99 | | - |
100 | | - $targets = get_targets($batch).map |$t| { $t.name }.sort |
| 88 | + $no_patches = $patching_result.ok_set.filter_set |$item| { $item.value['packages_updated'].empty }.names |
| 89 | + $with_patches = $patching_result.ok_set.filter_set |$item| { ! $item.value['packages_updated'].empty }.names |
| 90 | + $reboot_required = $patching_result.ok_set.filter_set |$item| { $item.value['reboot_required'] == true }.names |
| 91 | + $targets = get_targets($batch).map |$t| { $t.name }.sort |
101 | 92 |
|
102 | 93 | $output = { |
103 | | - failed => $patching_result.error_set.map |$n| { $n.name }.sort, |
| 94 | + failed => $patching_result.error_set.names, |
104 | 95 | health_check => $run_health_check, |
105 | 96 | health_check_failed => $health_check_failed, |
106 | 97 | no_patches => $no_patches, |
|
0 commit comments