before:
raw.stats.ansible_test.error.No-file-was-found-when-using-first_found.message:
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,"{\"msg\": \"An unhandled exception
occurred while running the lookup plugin 'first_found'. Error was a <class
'ansible.errors.AnsibleLookupError'>, original message: No file was found when using
first_found. Use errors='ignore' to allow this task to be skipped if no files are found\"}",
null,null,null,null,null,null,null,null,null,null,null]
after:
raw.stats.ansible_test.error.No-file-was-found-when-using-first_found.message:
["{\"msg\": \"An unhandled exception occurred while running the lookup plugin 'first_found'.
Error was a <class 'ansible.errors.AnsibleLookupError'>, original message: No file was found
when using first_found. Use errors='ignore' to allow this task to be skipped ifno files are found\"}"]
Signed-off-by: Wang Chenglong <18509160991(a)163.com>
---
lib/es_jobs.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/es_jobs.rb b/lib/es_jobs.rb
index 2d2f3bf..c5c0f0d 100644
--- a/lib/es_jobs.rb
+++ b/lib/es_jobs.rb
@@ -104,7 +104,7 @@ class ESJobs
def set_default_value(result, stats, metrics)
left_metrics = metrics - stats.keys
- left_metrics.each { |metric| result['raw.stats'][metric] << nil }
+ left_metrics.each { |metric| result['raw.stats'][metric] }
stats.each do |key, value|
result['raw.stats'][key] << value
--
2.23.0