mirror of
https://github.com/DaanSelen/meshbook.git
synced 2026-02-20 16:32:11 +00:00
8 lines
385 B
YAML
8 lines
385 B
YAML
---
|
|
name: Use DF to get drive information in JSON.
|
|
group: Systemec Development
|
|
target_os: "Linux"
|
|
tasks:
|
|
- name: Get disk-info with df returning JSON.
|
|
command: >
|
|
df -Th -x overlay -x tmpfs -x devtmpfs | awk 'NR>1 {printf "%s{\"size\":\"%s\",\"used\":\"%s\",\"available\":\"%s\",\"mount_point\":\"%s\",\"type\":\"%s\"}", (NR==2?"[":","), $3, $4, $5, $7, $2} END {print "]"}' |