workaround for filebeat: add newline at the end of xml reports

filebeat is unable to read xml files with results when they do not
finish with an empty line

Change-Id: I326192a784b652c2129d63d1b5fbf0bce8cd3a16
This commit is contained in:
Eduardo Olivares 2023-06-30 17:07:26 +02:00
parent c845501b73
commit 0c404a5928
1 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,13 @@
json_query("[?stat.exists].stat.path") }}
- name: "workaround for Filebeat - add newline to the end of xml report"
lineinfile:
dest: '{{ item }}'
line: ''
loop: '{{ report_files }}'
when: item.endswith('xml')
- name: "collect report files to local directory '{{ collect_dir }}'"
synchronize:
dest: '{{ collect_dir }}/{{ item | basename }}'