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
|
@ -23,6 +23,11 @@
|
|||
# when: nodejs_version != "12.x"
|
||||
|
||||
|
||||
- name: Record (initial) available disk space
|
||||
shell: df -PB1 $(findmnt / -o SOURCE -n) | awk 'NR==2 {print $4}'
|
||||
register: df1
|
||||
|
||||
|
||||
# BRUTAL but ensures consistency across OS's / distros like Raspbian Desktop &
|
||||
# Ubermix that often include an older version of Node-RED. Brutal, as this
|
||||
# removes customizations on graphical desktop OS's e.g. Raspbian Desktop's:
|
||||
|
@ -138,6 +143,17 @@
|
|||
|
||||
# RECORD Node-RED AS INSTALLED
|
||||
|
||||
- name: Record (final) available disk space
|
||||
shell: df -PB1 $(findmnt / -o SOURCE -n) | awk 'NR==2 {print $4}'
|
||||
register: df2
|
||||
|
||||
- name: Add 'nodered_disk_usage = {{ df1.stdout|int - df2.stdout|int }}' to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
|
||||
section: nodered
|
||||
option: nodered_disk_usage
|
||||
value: "{{ df1.stdout|int - df2.stdout|int }}"
|
||||
|
||||
- name: "Set 'nodered_installed: True'"
|
||||
set_fact:
|
||||
nodered_installed: True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue