1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Interim solution to iiab_home_url not being softcoded

This commit is contained in:
root 2020-02-12 05:23:57 -05:00
parent 7b067ca2ab
commit ac8e160e52
9 changed files with 74 additions and 34 deletions

View file

@ -147,6 +147,35 @@
- { src: 'roles/httpd/templates/010-iiab.conf.j2', dest: '/etc/{{ apache_conf_dir }}/010-iiab.conf' }
- { src: 'roles/httpd/templates/proxy_ajp.conf.j2', dest: '/etc/{{ apache_conf_dir }}/proxy_ajp.conf' }
- name: Install /etc/{{ apache_conf_dir }}/iiab-homepage.conf from template, for http://box redirect to http://box/home/
template:
src: iiab-homepage.conf
dest: "/etc/{{ apache_conf_dir }}/iiab-homepage.conf"
- name: "IN CASE NGINX IS DISABLED: Enable IIAB pages via Apache (e.g. on port 80) by running 'a2ensite 010-iiab.conf'"
command: a2ensite 010-iiab.conf
#when: apache_enabled | bool
# - name: Disable IIAB pages via Apache (e.g. on port 80) by running 'a2dissite 010-iiab.conf', if not apache_enabled"
# command: a2dissite 010-iiab.conf
# when: not apache_enabled
# MOVED FROM roles/homepage/tasks/main.yml (as NGINX-only IIAB's won't need it)
# and 'mkdir /library/www/html/home' is now done by roles/web_support for Admin
# Console which hard-codes that as a requirement as of 2020-02-12.
#
# './runrole --reinstall apache' is a decent solution today, for folks needing
# changes, but to make sure such things work in the field/offline/etc: soft-
# coding of iiab_home_url should probably be taken more seriously thruout IIAB!
#
- name: "IN CASE NGINX IS DISABLED: Enable iiab-homepage.conf via Apache (e.g. on port 80) by running 'a2ensite iiab-homepage.conf'"
command: a2ensite: iiab-homepage.conf
#when: apache_enabled | bool
# - name: Disable IIAB pages via Apache (e.g. on port 80) by running 'a2dissite iiab-homepage.conf', if not apache_enabled"
# command: a2dissite iiab-homepage.conf
# when: not apache_enabled
# - name: Enable & Stop '{{ apache_service }}' systemd service
# systemd:
# name: "{{ apache_service }}"

View file

@ -42,14 +42,6 @@
when: apache_installed is undefined
- name: "IN CASE NGINX IS DISABLED: Enable IIAB pages via Apache (e.g. on port 80) by running 'a2ensite 010-iiab.conf', if apache_enabled"
command: a2ensite 010-iiab.conf
when: apache_enabled | bool
- name: Disable IIAB pages via Apache (e.g. on port 80) by running 'a2dissite 010-iiab.conf', if not apache_enabled"
command: a2dissite 010-iiab.conf
when: not apache_enabled
- name: Enable & (Re)Start {{ apache_service }} systemd service, if apache_enabled
systemd:
name: "{{ apache_service }}"

View file

@ -0,0 +1,9 @@
# IIAB Home Page
# Redirect to home page on School Server
# Default [was] xs-portal [and is now generally] home
# RedirectMatch of root to homepage
# See the note in default_vars.yml
RedirectMatch ^/$ {{ iiab_home_url }}