mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Merge pull request #3668 from holta/mysql-on-demand
roles/nextcloud: Install prereq MySQL / MariaDB (that I missed yesterday!)
This commit is contained in:
commit
78d48b684c
4 changed files with 20 additions and 4 deletions
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
This 3rd `stage <https://github.com/iiab/iiab/wiki/IIAB-Contributors-Guide#ansible>`_ installs base server infra that `Internet-in-a-Box (IIAB) <https://internet-in-a-box.org/>`_ requires, including:
|
This 3rd `stage <https://github.com/iiab/iiab/wiki/IIAB-Contributors-Guide#ansible>`_ installs base server infra that `Internet-in-a-Box (IIAB) <https://internet-in-a-box.org/>`_ requires, including:
|
||||||
|
|
||||||
- |ss| `MySQL <https://github.com/iiab/iiab/blob/master/roles/mysql>`_ (database underlying many/most user-facing apps). |se| |nbsp| *As of 2023-11-05, MySQL / MariaDB is NO LONGER INSTALLED by 3-base-server — instead it's installed on-demand — as a dependency of Matomo, MediaWiki, WordPress &/or Admin Console.* This IIAB role (roles/mysql) also installs apt package:
|
- |ss| `MySQL <https://github.com/iiab/iiab/blob/master/roles/mysql>`_ (database underlying many/most user-facing apps). |se| |nbsp| *As of 2023-11-05, MySQL / MariaDB is NO LONGER INSTALLED by 3-base-server — instead it's installed on-demand — as a dependency of Matomo, MediaWiki, Nextcloud, WordPress &/or Admin Console.* This IIAB role (roles/mysql) also installs apt package:
|
||||||
- **php{{ php_version }}-mysql** — which forcibly installs **php{{ php_version }}-common**
|
- **php{{ php_version }}-mysql** — which forcibly installs **php{{ php_version }}-common**
|
||||||
- `NGINX <https://github.com/iiab/iiab/blob/master/roles/nginx>`_ web server (with Apache in some lingering cases). This IIAB role also installs apt package:
|
- `NGINX <https://github.com/iiab/iiab/blob/master/roles/nginx>`_ web server (with Apache in some lingering cases). This IIAB role also installs apt package:
|
||||||
- **php{{ php_version }}-fpm** — which forcibly installs **php{{ php_version }}-cli**, **php{{ php_version }}-common** and **libsodium23**
|
- **php{{ php_version }}-fpm** — which forcibly installs **php{{ php_version }}-cli**, **php{{ php_version }}-common** and **libsodium23**
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# 2023-11-05: MySQL (actually MariaDB) had been mandatory, installed on every
|
# 2023-11-05: MySQL (actually MariaDB) had been mandatory, installed on every
|
||||||
# IIAB by 3-base-server. Now installed on demand -- as a dependency of Matomo,
|
# IIAB by 3-base-server. Now installed on demand -- as a dependency of Matomo,
|
||||||
# MediaWiki, WordPress &/or Admin Console.
|
# MediaWiki, Nextcloud, WordPress &/or Admin Console.
|
||||||
# - name: MYSQL + CORE PHP
|
# - name: MYSQL + CORE PHP
|
||||||
# include_role:
|
# include_role:
|
||||||
# name: mysql
|
# name: mysql
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
- name: "Set 'mysql_install: True' and 'mysql_enabled: True'"
|
||||||
|
set_fact:
|
||||||
|
mysql_install: True
|
||||||
|
mysql_enabled: True
|
||||||
|
|
||||||
|
- name: MYSQL - run 'mysql' role (attempt to install & enable MySQL / MariaDB)
|
||||||
|
include_role:
|
||||||
|
name: mysql
|
||||||
|
|
||||||
|
- name: FAIL (STOP THE INSTALL) IF 'mysql_installed is undefined'
|
||||||
|
fail:
|
||||||
|
msg: "Nextcloud install cannot proceed, as MySQL / MariaDB is not installed."
|
||||||
|
when: mysql_installed is undefined
|
||||||
|
|
||||||
|
|
||||||
- name: Record (initial) disk space used
|
- name: Record (initial) disk space used
|
||||||
shell: df -B1 --output=used / | tail -1
|
shell: df -B1 --output=used / | tail -1
|
||||||
register: df1
|
register: df1
|
||||||
|
@ -108,7 +123,7 @@
|
||||||
nextcloud_dl_url: https://download.nextcloud.com/server/releases/latest-25.tar.bz2
|
nextcloud_dl_url: https://download.nextcloud.com/server/releases/latest-25.tar.bz2
|
||||||
when: php_version is version('8.0', '<')
|
when: php_version is version('8.0', '<')
|
||||||
|
|
||||||
- name: Unarchive {{ nextcloud_dl_url }} (~172 MB) to {{ nextcloud_root_dir }} (~606 MB initially, sometimes ~642 MB later, {{ apache_user }}:{{ apache_user }})
|
- name: Unarchive {{ nextcloud_dl_url }} (~172 MB) to {{ nextcloud_root_dir }} (~607 MB initially, sometimes ~643 MB later, {{ apache_user }}:{{ apache_user }})
|
||||||
unarchive:
|
unarchive:
|
||||||
remote_src: yes # Overwrite even if "already exists on the target"
|
remote_src: yes # Overwrite even if "already exists on the target"
|
||||||
src: "{{ nextcloud_dl_url }}"
|
src: "{{ nextcloud_dl_url }}"
|
||||||
|
|
|
@ -267,7 +267,8 @@ pi_swap_file_size: 1024
|
||||||
|
|
||||||
# 2023-11-05: MySQL (actually MariaDB) had been mandatory, installed on every
|
# 2023-11-05: MySQL (actually MariaDB) had been mandatory, installed on every
|
||||||
# IIAB by 3-base-server. Now installed on demand -- as a dependency of Matomo,
|
# IIAB by 3-base-server. Now installed on demand -- as a dependency of Matomo,
|
||||||
# MediaWiki, WordPress &/or Admin Console. BOTH VALUES BELOW INITIALLY IGNORED:
|
# MediaWiki, Nextcloud, WordPress &/or Admin Console. SO BOTH VALUES BELOW ARE
|
||||||
|
# INITIALLY IGNORED:
|
||||||
mysql_install: False
|
mysql_install: False
|
||||||
mysql_enabled: False
|
mysql_enabled: False
|
||||||
mysql_service: mariadb
|
mysql_service: mariadb
|
||||||
|
|
Loading…
Reference in a new issue