2022-10-12 10:08:57 +00:00
|
|
|
- hosts: website
|
|
|
|
gather_facts: yes
|
|
|
|
tasks:
|
|
|
|
- name: Get info
|
2022-10-25 06:26:56 +00:00
|
|
|
ansible.builtin.set_fact:
|
2022-10-12 10:08:57 +00:00
|
|
|
info:
|
|
|
|
arch: "{{ ansible_architecture }}"
|
|
|
|
distribution: "{{ ansible_distribution }}"
|
|
|
|
distribution_version: "{{ ansible_distribution_version }}"
|
|
|
|
kernel: "{{ ansible_kernel }}"
|
|
|
|
vendor: "{{ ansible_system_vendor }}"
|
|
|
|
model: "{{ ansible_product_name }}"
|
|
|
|
sn: "{{ ansible_product_serial }}"
|
|
|
|
cpu_vcpus: "{{ ansible_processor_vcpus }}"
|
|
|
|
memory: "{{ ansible_memtotal_mb }}"
|
|
|
|
disk_total: "{{ (ansible_mounts | map(attribute='size_total') | sum / 1024 / 1024 / 1024) | round(2) }}"
|
|
|
|
|
|
|
|
- debug:
|
|
|
|
var: info
|