add display_ok for multiple instances

This commit is contained in:
garnier-quentin 2020-06-24 17:16:16 +02:00
parent 97edc90de3
commit 7cc65a7fd1
1 changed files with 7 additions and 3 deletions

View File

@ -528,9 +528,13 @@ sub run_multiple_instances {
push @exits, $exit2;
my $output = $obj->output();
$long_msg .= $long_msg_append . $output;
$long_msg_append = $message_separator;
if (!defined($_->{display_ok}) || $_->{display_ok} != 0 ||
(defined($self->{option_results}->{display_ok_counters}) && $self->{option_results}->{display_ok_counters} ne '' &&
$_->{label} =~ /$self->{option_results}->{display_ok_counters}/)) {
$long_msg .= $long_msg_append . $output;
$long_msg_append = $message_separator;
}
if (!$self->{output}->is_status(litteral => 1, value => $exit2, compare => 'ok')) {
$short_msg .= $short_msg_append . $output;
$short_msg_append = $message_separator;