--- - name: Check disk usage and fail if any volume is more than 90% full shell: df --output=pcent,target | grep -v "/var/lib/docker/overlay2" | awk 'NR>1 {gsub("%","",$1); if ($1 > 90) print $2 " is " $1 "% full"}' register: disk_usage_check changed_when: false failed_when: disk_usage_check.stdout != "" tags: ["check"] ignore_errors: no