1
0
Fork 0
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:
root 2023-05-27 03:26:04 -04:00
parent 92142f0e7e
commit fc524462ba
48 changed files with 734 additions and 11 deletions

View file

@ -1,3 +1,8 @@
- name: Record (initial) available disk space
shell: df -PB1 $(findmnt / -o SOURCE -n) | awk 'NR==2 {print $4}'
register: df1
# CHECK FOR PHP VERSION AUTOMATICALLY, TO DETERMINE WHICH NEXTCLOUD TO INSTALL.
# INSPIRED BY: github.com/iiab/iiab/blob/master/roles/nodejs/tasks/main.yml
@ -119,6 +124,17 @@
# RECORD Nextcloud AS INSTALLED
- name: Record (final) available disk space
shell: df -PB1 $(findmnt / -o SOURCE -n) | awk 'NR==2 {print $4}'
register: df2
- name: Add 'nextcloud_disk_usage = {{ df1.stdout|int - df2.stdout|int }}' to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
section: nextcloud
option: nextcloud_disk_usage
value: "{{ df1.stdout|int - df2.stdout|int }}"
- name: "Set 'nextcloud_installed: True'"
set_fact:
nextcloud_installed: True

View file

@ -31,7 +31,7 @@
- name: Add 'nextcloud' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
section: Nextcloud
section: nextcloud
option: "{{ item.option }}"
value: "{{ item.value | string }}"
with_items: