aboutsummaryrefslogtreecommitdiffstats
path: root/resources/ansible_roles/inxi/tasks
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-23 19:37:16 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-24 08:53:40 +0800
commit48d36caabb09f2456a1d7ad64acb7aa099277eda (patch)
tree748c4bd2a5d4c3e2f6fc76a77b358f8174d598ab /resources/ansible_roles/inxi/tasks
parente579659699b4571a69990efc5861914e4701a4f6 (diff)
Save logs before collecting
Change-Id: I0e39103ef917fa7ea86d5c47de0cc71c37fca74c Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/ansible_roles/inxi/tasks')
-rw-r--r--resources/ansible_roles/inxi/tasks/main.yml13
1 files changed, 12 insertions, 1 deletions
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<hostname>.+)\sKernel'
- '.+\sMemory:\s+(?P<memory>.+MB)\s'
@@ -42,6 +52,7 @@
- '.+\sproduct:\s+(?P<product>.+)\sv'
dump: 'inix.log'
register: system_info
+ delegate_to: localhost
- name: create system information report
template: