|
|
|
@ -12,7 +12,12 @@
|
|
|
|
|
cpu_cores: "{{ ansible_processor_cores }}" |
|
|
|
|
cpu_vcpus: "{{ ansible_processor_vcpus }}" |
|
|
|
|
memory: "{{ ansible_memtotal_mb / 1024 | round(2) }}" |
|
|
|
|
disk_total: "{{ (ansible_mounts | map(attribute='size_total') | sum / 1024 / 1024 / 1024) | round(2) }}" |
|
|
|
|
disk_total: |- |
|
|
|
|
{% set ns = namespace(total=0) %} |
|
|
|
|
{%- for name, dev in ansible_devices.items() if dev.removable == '0' and dev.host != '' -%} |
|
|
|
|
{%- set ns.total = ns.total + ( dev.sectors | int * dev.sectorsize | int ) -%} |
|
|
|
|
{%- endfor -%} |
|
|
|
|
{{- (ns.total / 1024 / 1024 / 1024) | round(2) -}} |
|
|
|
|
distribution: "{{ ansible_distribution }}" |
|
|
|
|
distribution_version: "{{ ansible_distribution_version }}" |
|
|
|
|
arch: "{{ ansible_architecture }}" |
|
|
|
|