validations-common/validations_common/roles/check_cpu/tasks/main.yml
Jiri Podivin 6b11677987
Validations now gather only the subset of facts they need
The default facts gathering is set to false.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I2ac937df59f91b566029b0260e804d2972362f97
2021-02-23 10:42:51 +01:00

15 lines
362 B
YAML

---
- name: Gather facts
setup:
gather_subset:
- processor_count
- '!all'
- '!min'
- name: Verify the number of CPU cores
fail:
msg: >-
There are {{ ansible_processor_vcpus }} cores in the system,
but there should be at least {{ minimal_cpu_count }}
failed_when: "ansible_processor_vcpus|int < minimal_cpu_count|int"