---
- name: "OS Info"
  debug:
    msg: "OS: {{ ansible_os_family }}, version: {{ ansible_distribution_major_version }}"

- name: "check RAM"
  assert:
    that: "ansible_memtotal_mb >= {{ mbadmin.requirements.ram }}"
    fail_msg: "RAM size: {{ ansible_memtotal_mb }}, is lower than {{ mbadmin.requirements.ram }}"
    success_msg: "RAM size: {{ ansible_memtotal_mb }}"

- name: "check CPU"
  assert:
    that: "ansible_processor_vcpus >= {{ mbadmin.requirements.cores }}"
    fail_msg: "cores count: {{ ansible_processor_vcpus }}, is lower than {{ mbadmin.requirements.cores }}"
    success_msg: "CPU cores: {{ ansible_processor_vcpus }}"
