mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Install Apache on demand, for TK: ./runrole elgg|lokole|moodle|nodered
This commit is contained in:
parent
e62621e2e0
commit
223c92f5c5
13 changed files with 59 additions and 51 deletions
|
@ -1,5 +1,5 @@
|
|||
# (PRE-)release version number, for {{ iiab_env_file }} = /etc/iiab/iiab.env
|
||||
# iiab_base_ver: 7.0
|
||||
# iiab_base_ver: 7.1
|
||||
# iiab_revision: 0
|
||||
# ABOVE MOVED TO /opt/iiab/iiab/vars/default_vars.yml
|
||||
|
||||
|
@ -14,7 +14,6 @@ discovered_wan_iface: none
|
|||
|
||||
# Old defs
|
||||
gui_port: 80
|
||||
exFAT_enabled: False
|
||||
is_F18: False
|
||||
|
||||
# Set default 1-prep discovered hardware
|
||||
|
|
|
@ -43,29 +43,10 @@
|
|||
- name: Pre-check that IIAB's "XYZ_install" + "XYZ_enabled" vars (1) are defined, (2) are boolean-not-string variables, and (3) contain plausible values. Also checks that "XYZ_install" is True when "XYZ_installed" is defined.
|
||||
include_tasks: validate_vars.yml
|
||||
|
||||
# SEE: https://github.com/iiab/iiab/blob/master/roles/nginx/README.md
|
||||
- name: "apache_install is currently '{{ apache_install }}' and apache_enabled is currently '{{ apache_enabled }}'. Now let's set 'apache_install: True' and 'apache_enabled: True' if NGINX is set not to be enabled OR if any of {Elgg, Lokole, Moodle, Node-RED} are set to install."
|
||||
set_fact:
|
||||
apache_install: True
|
||||
apache_enabled: True
|
||||
when: not nginx_enabled or elgg_install or lokole_install or moodle_install or nodered_install
|
||||
#
|
||||
#- name: "Verify 'apache_install: True' and 'apache_enabled: True' if any of {DokuWiki, Elgg, Lokole, Moodle, Nextcloud, Node-RED} are set to install"
|
||||
# assert:
|
||||
# that: apache_install and apache_enabled or not (dokuwiki_install or elgg_install or lokole_install or moodle_install or nextcloud_install or nodered_install)
|
||||
# fail_msg: "PLEASE CONFIRM 'apache_install: True' AND 'apache_enable: True' IF YOU'RE TRYING TO INSTALL ANY OF {dokuwiki, elgg, lokole, moodle, nextcloud, nodered} e.g. IN: /etc/iiab/local_vars.yml"
|
||||
# quiet: yes
|
||||
#
|
||||
#- name: "Verify 'apache_install: True' and 'apache_enabled: True' if 'nginx_enabled: False' -- e.g. for Apache testing of older playbooks lacking full NGINX support"
|
||||
# assert:
|
||||
# that: apache_install and apache_enabled or nginx_enabled
|
||||
# fail_msg: "PLEASE CONFIRM 'apache_install: True' AND 'apache_enable: True' IF 'nginx_enabled: False' e.g. IN: /etc/iiab/local_vars.yml"
|
||||
# quiet: yes
|
||||
|
||||
- name: Set exFAT_enabled if xo_model != "none"
|
||||
set_fact:
|
||||
exFAT_enabled: True
|
||||
when: xo_model != "none"
|
||||
#- name: Set exFAT_enabled if xo_model != "none"
|
||||
# set_fact:
|
||||
# exFAT_enabled: True
|
||||
# when: xo_model != "none"
|
||||
|
||||
# Discover: do we have a gateway?
|
||||
# If Ansible detects gateway, becomes WAN candidate.
|
||||
|
|
|
@ -8,10 +8,11 @@
|
|||
name: mysql
|
||||
when: mysql_install | bool
|
||||
|
||||
- name: HTTPD (Apache)
|
||||
include_role:
|
||||
name: httpd
|
||||
when: apache_install | bool
|
||||
# 2020-05-16: invoked as nec by roles {elgg, lokole, moodle, nodered}
|
||||
# - name: HTTPD (Apache)
|
||||
# include_role:
|
||||
# name: httpd
|
||||
# when: apache_install | bool
|
||||
|
||||
- name: NGINX
|
||||
include_role:
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
# Assume (enforce!) we only get here if elgg_install: True
|
||||
# Assume (enforce?) MySQL is running
|
||||
- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||
set_fact:
|
||||
apache_install: True
|
||||
apache_enabled: True
|
||||
|
||||
- name: APACHE - run 'httpd' role
|
||||
include_role:
|
||||
name: httpd
|
||||
|
||||
|
||||
# Assume (enforce?) MySQL is running
|
||||
#
|
||||
# - name: "Set 'mysql_install: True' and 'mysql_enabled: True'"
|
||||
# set_fact:
|
||||
# mysql_install: True
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
# Lokole PDF (User's Guide) gets copied for offline use (http://box/info) here:
|
||||
# https://github.com/iiab/iiab/blob/master/roles/httpd/templates/refresh-wiki-docs.sh#L51-L52
|
||||
|
||||
|
||||
- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||
set_fact:
|
||||
apache_install: True
|
||||
apache_enabled: True
|
||||
|
||||
- name: APACHE - run 'httpd' role
|
||||
include_role:
|
||||
name: httpd
|
||||
|
||||
|
||||
- name: "Install 8 packages for Lokole: python3, python3-pip, python3-venv, python3-dev, python3-bcrypt, libffi-dev, libssl-dev, libopenjp2-7"
|
||||
apt:
|
||||
name:
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||
set_fact:
|
||||
apache_install: True
|
||||
apache_enabled: True
|
||||
|
||||
- name: APACHE - run 'httpd' role
|
||||
include_role:
|
||||
name: httpd
|
||||
|
||||
|
||||
- name: "Set 'postgresql_install: True' and 'postgresql_enabled: True'"
|
||||
set_fact:
|
||||
postgresql_install: True
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||
set_fact:
|
||||
apache_install: True
|
||||
apache_enabled: True
|
||||
|
||||
- name: APACHE - run 'httpd' role
|
||||
include_role:
|
||||
name: httpd
|
||||
|
||||
|
||||
# 2019-01-16: @jvonau's PR #1403 moved installation of Node.js (8.x for now) &
|
||||
# npm to roles/nodejs/tasks/main.yml
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# Role "www_base" runs here, probably in 3-BASE-SERVER.
|
||||
# Role "www_options" runs later, likely in 4-SERVER-OPTIONS.
|
||||
#
|
||||
# (Don't take either name too literally!)
|
||||
|
||||
- name: Using html.yml
|
||||
include_tasks: html.yml
|
||||
|
@ -15,7 +13,6 @@
|
|||
path: "{{ doc_root }}/home" # /library/www/html
|
||||
owner: "{{ apache_user }}"
|
||||
group: "{{ apache_user }}"
|
||||
# mode: '0755'
|
||||
|
||||
- name: Create dir {{ doc_root }}/info for http://box/info offline docs
|
||||
file:
|
||||
|
@ -23,7 +20,6 @@
|
|||
path: "{{ doc_root }}/info" # /library/www/html
|
||||
owner: "{{ apache_user }}"
|
||||
group: "{{ apache_user }}"
|
||||
# mode: '0755'
|
||||
|
||||
- name: Install /usr/bin/iiab-refresh-wiki-docs (scraper script) to create http://box/info offline documentation. (Script can be run manually and/or at the end of Stage 4 = roles/4-server-options/tasks/main.yml)
|
||||
template:
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# Role "www_base" runs earlier, likely in 3-BASE-SERVER.
|
||||
# Role "www_options" runs here, probably in 4-SERVER-OPTIONS.
|
||||
#
|
||||
# (Don't take either name too literally!)
|
||||
|
||||
|
||||
# HOMEPAGE
|
||||
|
|
|
@ -223,10 +223,6 @@ pi_swap_file_size: 1024
|
|||
|
||||
# 2-COMMON
|
||||
|
||||
# Auto-enabled in roles/2-common/tasks/packages.yml as set in
|
||||
# 0-init/defaults/main.yml AND 0-init/tasks/main.yml :
|
||||
exFAT_enabled: True
|
||||
|
||||
# /usr/libexec/iiab-startup.sh is much like autoexec.bat & /etc/rc.local
|
||||
# It's put in place by 2-common/tasks/iiab-startup.yml at the end of Stage 2.
|
||||
|
||||
|
@ -260,13 +256,19 @@ nginx_high_php_limits: False
|
|||
# ...ARE SUITABLE FOR YOUR HARDWARE, for: /etc/php/<VERSION>/fpm/php.ini
|
||||
|
||||
# See also Apache vars {default_language, language_priority} @ top of this file
|
||||
#
|
||||
# 2020-05-16: apache_install is completely ignored as Node.js is installed
|
||||
# on demand as a dependency -- by Elgg, Lokole, Moodle and/or Node-RED --
|
||||
# but for now we set fake value 'apache_install: True' so that
|
||||
# 'apache_installed is defined' input validation works, e.g. in
|
||||
# 0-init/tasks/validate_vars.yml
|
||||
apache_install: True
|
||||
apache_enabled: False
|
||||
#
|
||||
# NGINX proxies to Apache for legacy IIAB services, using:
|
||||
apache_port: 8090
|
||||
apache_interface: 127.0.0.1 # 2020-01-13: Var unused
|
||||
#
|
||||
|
||||
# Make this False to disable http://box/common/services/power_off.php button:
|
||||
apache_allow_sudo: True
|
||||
|
||||
|
|
|
@ -138,9 +138,6 @@ pi_swap_file_size: 1024
|
|||
|
||||
# 2-COMMON
|
||||
|
||||
# exFAT_enabled: True is auto-enabled in roles/2-common/tasks/packages.yml
|
||||
# as set in 0-init/defaults/main.yml AND 0-init/tasks/main.yml
|
||||
|
||||
# /usr/libexec/iiab-startup.sh is much like autoexec.bat & /etc/rc.local
|
||||
# It's put in place by 2-common/tasks/iiab-startup.yml at the end of Stage 2.
|
||||
|
||||
|
|
|
@ -138,9 +138,6 @@ pi_swap_file_size: 1024
|
|||
|
||||
# 2-COMMON
|
||||
|
||||
# exFAT_enabled: True is auto-enabled in roles/2-common/tasks/packages.yml
|
||||
# as set in 0-init/defaults/main.yml AND 0-init/tasks/main.yml
|
||||
|
||||
# /usr/libexec/iiab-startup.sh is much like autoexec.bat & /etc/rc.local
|
||||
# It's put in place by 2-common/tasks/iiab-startup.yml at the end of Stage 2.
|
||||
|
||||
|
|
|
@ -138,9 +138,6 @@ pi_swap_file_size: 1024
|
|||
|
||||
# 2-COMMON
|
||||
|
||||
# exFAT_enabled: True is auto-enabled in roles/2-common/tasks/packages.yml
|
||||
# as set in 0-init/defaults/main.yml AND 0-init/tasks/main.yml
|
||||
|
||||
# /usr/libexec/iiab-startup.sh is much like autoexec.bat & /etc/rc.local
|
||||
# It's put in place by 2-common/tasks/iiab-startup.yml at the end of Stage 2.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue