1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Clean df syntax, for each app's disk usage in iiab.ini

This commit is contained in:
root 2023-06-10 09:10:47 -04:00
parent 2d62b975bf
commit 3f63c0b4dd
47 changed files with 279 additions and 279 deletions

View file

@ -8,8 +8,8 @@
# https://github.com/rbrito/usbmount/blob/master/usbmount.conf (2010-04-25)
- name: Record (initial) available disk space
shell: df -PB1 $(findmnt / -o SOURCE -n) | awk 'NR==2 {print $4}'
- name: Record (initial) disk space used
shell: df -B1 --output=used / | tail -1
register: df1
@ -93,16 +93,16 @@
# RECORD 'USB_LIB' AS INSTALLED
- name: Record (final) available disk space
shell: df -PB1 $(findmnt / -o SOURCE -n) | awk 'NR==2 {print $4}'
- name: Record (final) disk space used
shell: df -B1 --output=used / | tail -1
register: df2
- name: Add 'usb_lib_disk_usage = {{ df1.stdout|int - df2.stdout|int }}' to {{ iiab_ini_file }}
- name: Add 'usb_lib_disk_usage = {{ df2.stdout|int - df1.stdout|int }}' to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
section: usb_lib
option: usb_lib_disk_usage
value: "{{ df1.stdout|int - df2.stdout|int }}"
value: "{{ df2.stdout|int - df1.stdout|int }}"
- name: "Set 'usb_lib_installed: True'"
set_fact: