diff --git a/plans/patch_batch.pp b/plans/patch_batch.pp index 59de862..707f972 100644 --- a/plans/patch_batch.pp +++ b/plans/patch_batch.pp @@ -56,7 +56,7 @@ # get nodes that are 'clean' from health check results $nodes_to_patch = ($health_checks.filter_set |$item| { $item.value['state'] == 'clean' }).map |$n| { $n.target } - $health_check_failed = ($health_checks.filter_set |$item| { $item.status == 'failure' }).map |$n| { $n.target } + $health_check_failed = ($health_checks.filter_set |$item| { $item.status == 'failure' }).map |$n| { $n.name }.sort if $debug { out::message('patch_batch.pp: Nodes to patch after health check:') @@ -87,20 +87,20 @@ $no_patches = $patching_result.ok_set.filter |$item| { $item.value['packages_updated'].empty - }.map |$n| { $n.target } + }.map |$n| { $n.name }.sort $with_patches = $patching_result.ok_set.filter |$item| { ! $item.value['packages_updated'].empty - }.map |$n| { $n.target } + }.map |$n| { $n.name }.sort $reboot_required = $patching_result.ok_set.filter |$item| { $item.value['reboot_required'] == true - }.map |$n| { $n.target } + }.map |$n| { $n.name }.sort $targets = get_targets($batch).map |$t| { $t.name }.sort $output = { - failed => $patching_result.error_set.names, + failed => $patching_result.error_set.map |$n| { $n.name }.sort, health_check => $run_health_check, health_check_failed => $health_check_failed, no_patches => $no_patches,