# Base Server

- name: ...IS BEGINNING =====================================
  meta: noop

# 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,
# MediaWiki, Nextcloud, PBX (for FreePBX), WordPress &/or Admin Console.
# - name: MYSQL + CORE PHP
#   include_role:
#     name: mysql
#   #when: mysql_install

# 2021-05-21: Apache role 'httpd' is installed as nec by any of these 6 roles:
#
#    cups, elgg, moodle, nodered, pbx, phpmyadmin
#
# These 14 roles conditionally touch /etc/apache2/sites-available/*.conf files:
#
#    awstats, calibre-web, gitea, internetarchive, kalite, kiwix, kolibri,
#    mediawiki, munin, nextcloud, sugarizer, usb_lib, wordpress, www_options
#
# SEE ALSO: https://github.com/iiab/iiab/blob/master/roles/nginx/README.md

- name: NGINX + CORE PHP
  include_role:
    name: nginx
  #when: nginx_install

- name: WWW_BASE (WWW_OPTIONS should be installed later)
  include_role:
    name: www_base
  #when: www_base_install    # Flag might be created in future?

- name: Recording STAGE 3 HAS COMPLETED =====================
  lineinfile:
    path: "{{ iiab_env_file }}"
    regexp: '^STAGE=*'
    line: 'STAGE=3'