From 48d36caabb09f2456a1d7ad64acb7aa099277eda Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Sun, 23 Apr 2017 19:37:16 +0800 Subject: Save logs before collecting Change-Id: I0e39103ef917fa7ea86d5c47de0cc71c37fca74c Signed-off-by: Yujun Zhang --- resources/ansible_roles/inxi/tasks/main.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'resources/ansible_roles/inxi/tasks/main.yml') diff --git a/resources/ansible_roles/inxi/tasks/main.yml b/resources/ansible_roles/inxi/tasks/main.yml index 0267b680..6d041e3f 100644 --- a/resources/ansible_roles/inxi/tasks/main.yml +++ b/resources/ansible_roles/inxi/tasks/main.yml @@ -16,6 +16,16 @@ command: inxi -b -c0 -n register: inxi_out +- name: generating log filename + set_fact: + logfile: "{{ qtip_results }}/inxi.log" + +- name: saving output to log + copy: + content: "{{ inxi_out.stdout }}" + dest: "{{ logfile }}" + delegate_to: localhost + # TODO(yujunz) normalize system information, test condition and performance metrics for future data mining # e.g. convert "2 Deca core Intel Xeon E5-2650 v3s (-HT-MCP-SMP-) speed/max: 1200/3000 MHz" to # --- @@ -31,7 +41,7 @@ # cache_mb: None - name: collect system information from inxi collect: - string: "{{ inxi_out.stdout }}" + string: "{{ lookup('file', logfile) }}" patterns: - '.+\s+Host:\s+(?P.+)\sKernel' - '.+\sMemory:\s+(?P.+MB)\s' @@ -42,6 +52,7 @@ - '.+\sproduct:\s+(?P.+)\sv' dump: 'inix.log' register: system_info + delegate_to: localhost - name: create system information report template: -- cgit 1.2.3-korg