diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-04-20 22:51:59 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-04-21 13:43:50 +0800 |
commit | 6144eac326d14e26bbb849abea51c4cf7f3881b6 (patch) | |
tree | 15ab6fcd3eadfb6d9ae7d089b237a2f0416a9235 /resources/roles/inxi | |
parent | 7273ca98a91399e188af15e192be93724977fe08 (diff) |
Group test results and report under node
Change-Id: I66286787d06c5012c6dcf516cffb9f6fd76522c5
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/roles/inxi')
-rw-r--r-- | resources/roles/inxi/tasks/main.yml | 7 | ||||
-rw-r--r-- | resources/roles/inxi/templates/system-info.j2 | 16 |
2 files changed, 23 insertions, 0 deletions
diff --git a/resources/roles/inxi/tasks/main.yml b/resources/roles/inxi/tasks/main.yml index 47eb2e73..66c83f9d 100644 --- a/resources/roles/inxi/tasks/main.yml +++ b/resources/roles/inxi/tasks/main.yml @@ -42,3 +42,10 @@ - '.+\sproduct:\s+(?P<product>.+)\sv' dump: 'inix.log' register: system_info + +- name: create system information report + template: + src: system-info.j2 + dest: "{{ qtip_results }}/{{ inventory_hostname }}/system-info" + delegate_to: localhost + tags: [report] diff --git a/resources/roles/inxi/templates/system-info.j2 b/resources/roles/inxi/templates/system-info.j2 new file mode 100644 index 00000000..305a2af2 --- /dev/null +++ b/resources/roles/inxi/templates/system-info.j2 @@ -0,0 +1,16 @@ +System Information from inxi +============================ + +{% for host in groups['compute'] %} +{{ hostvars[host].ansible_hostname }} +----------------------------- + +{{ ('CPU Brand', hostvars[host].system_info.cpu[0])|justify }} +{{ ('Disk', hostvars[host].system_info.disk[0])|justify }} +{{ ('Host Name', hostvars[host].system_info.hostname[0])|justify }} +{{ ('Kernel', hostvars[host].system_info.kernel[0])|justify }} +{{ ('Memory', hostvars[host].system_info.memory[0])|justify }} +{{ ('Operating System', hostvars[host].system_info.os[0])|justify }} +{{ ('Product', hostvars[host].system_info.product[0])|justify }} + +{% endfor %} |