Fix disk check — df -P POSIX flag compatible with BusyBox Alpine and GNU coreutils
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
- name: Check disk space on critical mountpoints
|
||||
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
|
||||
changed_when: false
|
||||
loop:
|
||||
|
||||
Reference in New Issue
Block a user