Fix disk check — df -P POSIX flag compatible with BusyBox Alpine and GNU coreutils

This commit is contained in:
Semaphore
2026-03-11 10:48:16 -07:00
parent 964b2a7909
commit 184af05310

View File

@@ -8,7 +8,7 @@
- name: Check disk space on critical mountpoints - name: Check disk space on critical mountpoints
ansible.builtin.shell: | ansible.builtin.shell: |
df {{ item }} --output=pcent | tail -1 | tr -d ' %' df -P {{ item }} | tail -1 | awk '{print $5}' | tr -d '%' # POSIX flag — compatible with BusyBox (Alpine) and GNU coreutils
register: disk_usage register: disk_usage
changed_when: false changed_when: false
loop: loop: