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:
parent
2d62b975bf
commit
3f63c0b4dd
47 changed files with 279 additions and 279 deletions
|
@ -12,8 +12,8 @@
|
|||
# can arise without warning when WordPress is online, since WordPress ~4.8
|
||||
|
||||
|
||||
- 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
|
||||
|
||||
|
||||
|
@ -140,16 +140,16 @@
|
|||
|
||||
# RECORD WordPress 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 'wordpress_disk_usage = {{ df1.stdout|int - df2.stdout|int }}' to {{ iiab_ini_file }}
|
||||
- name: Add 'wordpress_disk_usage = {{ df2.stdout|int - df1.stdout|int }}' to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
|
||||
section: wordpress
|
||||
option: wordpress_disk_usage
|
||||
value: "{{ df1.stdout|int - df2.stdout|int }}"
|
||||
value: "{{ df2.stdout|int - df1.stdout|int }}"
|
||||
|
||||
- name: "Set 'wordpress_installed: True'"
|
||||
set_fact:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue