2022-10-12 10:08:57 +00:00
|
|
|
- hosts: windows
|
|
|
|
gather_facts: yes
|
|
|
|
tasks:
|
|
|
|
- name: Get info
|
|
|
|
set_fact:
|
|
|
|
info:
|
|
|
|
arch: "{{ ansible_architecture2 }}"
|
|
|
|
distribution: "{{ ansible_distribution }}"
|
|
|
|
distribution_version: "{{ ansible_distribution_version }}"
|
|
|
|
kernel: "{{ ansible_kernel }}"
|
|
|
|
vendor: "{{ ansible_system_vendor }}"
|
|
|
|
model: "{{ ansible_product_name }}"
|
|
|
|
sn: "{{ ansible_product_serial }}"
|
2024-07-09 06:22:22 +00:00
|
|
|
cpu_count: "{{ ansible_processor_count }}"
|
|
|
|
cpu_cores: "{{ ansible_processor_cores }}"
|
2022-10-12 10:08:57 +00:00
|
|
|
cpu_vcpus: "{{ ansible_processor_vcpus }}"
|
2024-07-09 06:22:22 +00:00
|
|
|
memory: "{{ (ansible_memtotal_mb / 1024) | round(2) }}"
|
2022-10-17 03:22:21 +00:00
|
|
|
|
2022-10-12 10:08:57 +00:00
|
|
|
- debug:
|
|
|
|
var: info
|