copr: make sure that swap is available for our builders

This commit is contained in:
Jakub Kadlcik 2021-01-31 19:50:17 +01:00 committed by praiskup
parent a6ce5fa016
commit c7bcb48be7

View file

@ -138,3 +138,15 @@
- name: mount cache filesystem on /var/cache/mock
mount: path=/var/cache/mock state=mounted src=mock_cache_tmpfs fstype=tmpfs opts="size=32G"
when: mock_var_cache_tmpfs is defined
- name: Collect facts about builder hardware
setup:
gather_subset:
- hardware
- name: Make sure that at least 135G of swap is available
assert:
that:
- ansible_memory_mb.swap.free >= 1024 * 135
fail_msg: "Swap is not available, the builder is unusable"
success_msg: "Swap seems to be available for this builder"