mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Record approx disk usage for 45 roles (to iiab.ini)
This commit is contained in:
parent
92142f0e7e
commit
fc524462ba
48 changed files with 734 additions and 11 deletions
|
@ -7,6 +7,12 @@
|
|||
# https://github.com/rbrito/usbmount/blob/master/README.md (2018-08-10)
|
||||
# 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}'
|
||||
register: df1
|
||||
|
||||
|
||||
- name: Does systemd-udevd.service exist
|
||||
stat:
|
||||
path: "{{ systemd_location }}/systemd-udevd.service"
|
||||
|
@ -87,6 +93,17 @@
|
|||
|
||||
# RECORD 'USB_LIB' AS INSTALLED
|
||||
|
||||
- name: Record (final) available disk space
|
||||
shell: df -PB1 $(findmnt / -o SOURCE -n) | awk 'NR==2 {print $4}'
|
||||
register: df2
|
||||
|
||||
- name: Add 'usb_lib_disk_usage = {{ df1.stdout|int - df2.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 }}"
|
||||
|
||||
- name: "Set 'usb_lib_installed: True'"
|
||||
set_fact:
|
||||
usb_lib_installed: True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue