copr-builders: assert 15G free space in /var/lib/copr-rpmbuild

This commit is contained in:
Pavel Raiskup 2023-10-20 10:25:35 +02:00
parent 7639b55d5a
commit bda1d88854
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,9 @@
---
- name: "call dnf on {{ path }}"
shell: "df '{{ path }}' --output=avail | tail -1"
register: df
changed_when: false
- name: "assert {{ path }} has {{ size }} bytes left (has {{ df.stdout }})"
assert:
that: "df.stdout|int > size|int"

View file

@ -246,3 +246,13 @@
success_msg: "Builder has enough memory/swap!"
when:
- prepare_base_image is not defined
- name: check disk space
include_tasks:
file: check_path_free_space.yml
vars:
path: "{{ item.path }}"
size: "{{ item.size|int }}"
loop:
- path: /var/lib/copr-rpmbuild
size: 15000000