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

@ -12,6 +12,15 @@
# 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}'
register: df1
- name: Provision MySQL DB
include_tasks: setup.yml
# 2021-06-29: PHP modules, covering "RECOMMENDED" and "OPTIONAL" sections here:
# https://make.wordpress.org/hosting/handbook/server-environment/
- name: Install libsodium23 + 8 PHP packages (run 'php -m' or 'php -i' to verify)
@ -131,6 +140,17 @@
# RECORD WordPress AS INSTALLED
- name: Record (final) available disk space
shell: df -PB1 $(findmnt / -o SOURCE -n) | awk 'NR==2 {print $4}'
register: df2
- name: Add 'wordpress_disk_usage = {{ df1.stdout|int - df2.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 }}"
- name: "Set 'wordpress_installed: True'"
set_fact:
wordpress_installed: True

View file

@ -23,19 +23,13 @@
- block:
- name: Provision MySQL DB for WordPress, if 'wordpress_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: setup.yml
when: wordpress_installed is undefined # and not installing
- name: Install WordPress if 'wordpress_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: wordpress_installed is undefined
- name: Enable/Disable/Restart NGINX
include_tasks: nginx.yml
- name: Add 'wordpress' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini