mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Further reduce dependency on Apache
This commit is contained in:
parent
8efc06a273
commit
5c904b30ea
7 changed files with 42 additions and 29 deletions
|
@ -8,16 +8,14 @@
|
||||||
name: mysql
|
name: mysql
|
||||||
when: mysql_install | bool
|
when: mysql_install | bool
|
||||||
|
|
||||||
# 2020-05-17: Invoked as nec by 5 roles {cups, elgg, lokole, moodle, nodered}.
|
# 2020-05-20: Apache role 'httpd' is installed as nec by any of these 6 roles:
|
||||||
# These 13 roles conditionally touch Apache .conf files etc: awstats,
|
# cups, elgg, lokole, moodle, nodered, phpmyadmin.
|
||||||
# calibre-web, gitea, kalite, kiwix, kolibri, mediawiki, munin, nextcloud,
|
|
||||||
# sugarizer, usb_lib, wordpress, www_options. SEE ALSO: roles/nginx/README.md
|
|
||||||
# CAUTION: mysql/tasks/install.yml's php install drags in apache2 regardless !
|
|
||||||
#
|
#
|
||||||
# - name: HTTPD (Apache)
|
# These 14 roles conditionally touch Apache .conf files etc: awstats,
|
||||||
# include_role:
|
# calibre-web, gitea, internetarchive, kalite, kiwix, kolibri, mediawiki,
|
||||||
# name: httpd
|
# munin, nextcloud, sugarizer, usb_lib, wordpress, www_options.
|
||||||
# when: apache_install | bool
|
#
|
||||||
|
# SEE ALSO: roles/nginx/README.md
|
||||||
|
|
||||||
- name: NGINX
|
- name: NGINX
|
||||||
include_role:
|
include_role:
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
|
|
||||||
# TO DO:
|
# TO DO:
|
||||||
# - validate input vars + prereqs
|
# - validate input vars + prereqs
|
||||||
# - move 7 top stanzas into install.yml
|
# - move ~7 top stanzas into install.yml
|
||||||
# - move 7 next stanzas into enable-or-disable.yml
|
# - move ~7 next stanzas into enable-or-disable.yml
|
||||||
|
# - create /etc/nginx/conf.d/cups-nginx.conf as SHIM to Apache on port 8090 ?
|
||||||
|
# - deprecate ~2 F18 stanzas?
|
||||||
|
|
||||||
|
|
||||||
- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||||
|
|
|
@ -56,13 +56,16 @@
|
||||||
|
|
||||||
# 3. CONFIG FILES
|
# 3. CONFIG FILES
|
||||||
|
|
||||||
- name: "Install from templates: /etc/systemd/system/internetarchive.service, /etc/{{ apache_conf_dir }}/internetarchive.conf"
|
- name: "Install from template: /etc/systemd/system/internetarchive.service"
|
||||||
template:
|
template:
|
||||||
src: "{{ item.src }}"
|
src: internetarchive.service.j2
|
||||||
dest: "{{ item.dest }}"
|
dest: /etc/systemd/system/internetarchive.service
|
||||||
with_items:
|
|
||||||
- { src: 'internetarchive.service.j2', dest: '/etc/systemd/system/internetarchive.service' }
|
- name: "Install from template: /etc/{{ apache_conf_dir }}/internetarchive.conf"
|
||||||
- { src: 'internetarchive.conf', dest: '/etc/{{ apache_conf_dir }}/internetarchive.conf' } # apache2/sites-available
|
template:
|
||||||
|
src: internetarchive.conf
|
||||||
|
dest: "{{ /etc/{{ apache_conf_dir }}/internetarchive.conf }}" # apache2/sites-available
|
||||||
|
when: apache_installed is defined
|
||||||
|
|
||||||
|
|
||||||
# 4. RECORD Internet Archive AS INSTALLED
|
# 4. RECORD Internet Archive AS INSTALLED
|
||||||
|
|
|
@ -51,7 +51,6 @@
|
||||||
when: internetarchive_installed is undefined and internet_available
|
when: internetarchive_installed is undefined and internet_available
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ENABLE/DISABLE/RESTART SYSTEMD SERVICE & WEB SERVERS AS NEC ?
|
# ENABLE/DISABLE/RESTART SYSTEMD SERVICE & WEB SERVERS AS NEC ?
|
||||||
|
|
||||||
- name: Enable & Restart 'internetarchive' systemd service, if internetarchive_enabled
|
- name: Enable & Restart 'internetarchive' systemd service, if internetarchive_enabled
|
||||||
|
@ -69,10 +68,9 @@
|
||||||
state: stopped
|
state: stopped
|
||||||
when: not internetarchive_enabled
|
when: not internetarchive_enabled
|
||||||
|
|
||||||
#- name: Enable/Disable/Restart Apache if primary
|
- name: Enable/Disable/Restart Apache if primary
|
||||||
- name: SHIM FOR NOW SO ALWAYS DO THE...Enable/Disable/Restart Apache
|
|
||||||
include_tasks: apache.yml
|
include_tasks: apache.yml
|
||||||
#when: not nginx_enabled
|
when: apache_installed is defined and not nginx_enabled
|
||||||
|
|
||||||
- name: Enable/Disable/Restart NGINX if primary
|
- name: Enable/Disable/Restart NGINX if primary
|
||||||
include_tasks: nginx.yml
|
include_tasks: nginx.yml
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
name:
|
name:
|
||||||
- mariadb-server
|
- mariadb-server
|
||||||
- mariadb-client
|
- mariadb-client
|
||||||
- php{{ php_version }} # On Ubuntu 20.04 (and prob other OS's) this forces the install of: apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php{{ php_version }} ETC
|
# - php{{ php_version }} # On Ubuntu 20.04 (and prob other OS's) this forces the install of: apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php{{ php_version }} ETC
|
||||||
|
- php{{ php_version }}-common # 2020-05-19: @jvonau suggests this to avoid Apache above. Or its superset php{{ php_version }}-cli if absolutely nec?
|
||||||
- php{{ php_version }}-mysql
|
- php{{ php_version }}-mysql
|
||||||
- php-pear
|
- php-pear
|
||||||
- php{{ php_version }}-gd
|
- php{{ php_version }}-gd
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
2. Without PHP available via FastCGI, any function at all for PHP-based applications validates NGINX.
|
2. Without PHP available via FastCGI, any function at all for PHP-based applications validates NGINX.
|
||||||
|
|
||||||
3. Current state of IIAB App/Service migrations as of 2020-05-17:
|
3. Current state of IIAB App/Service migrations as of 2020-05-20:
|
||||||
|
|
||||||
1. These support "Native" NGINX but ***NOT*** Apache
|
1. These support "Native" NGINX but ***NOT*** Apache
|
||||||
* Admin Console
|
* Admin Console
|
||||||
|
@ -32,8 +32,8 @@
|
||||||
* sugarizer
|
* sugarizer
|
||||||
* wordpress
|
* wordpress
|
||||||
|
|
||||||
3. These support Apache but ***NOT*** "Native" NGINX. They use a "Shim" to [proxy_pass](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) from NGINX to Apache on port 8090. See [roles/3-base-server/tasks/main.yml#L11](../3-base-server/tasks/main.yml#L11) for a list of these IIAB Apps/Services, that auto-enable Apache.
|
3. These support Apache but ***NOT*** "Native" NGINX. They use a "Shim" to [proxy_pass](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) from NGINX to Apache on port 8090. See [roles/3-base-server/tasks/main.yml#L11](../3-base-server/tasks/main.yml#L11) for a list of IIAB Apps/Services that auto-enable Apache.
|
||||||
* cups ?
|
* cups [*, shim not yet in place.]
|
||||||
* elgg
|
* elgg
|
||||||
* lokole
|
* lokole
|
||||||
* moodle
|
* moodle
|
||||||
|
@ -46,6 +46,7 @@
|
||||||
* minetest [*]
|
* minetest [*]
|
||||||
* openvpn
|
* openvpn
|
||||||
* pbx [*]
|
* pbx [*]
|
||||||
|
* phpmyadmin [*, requires Apache for now, as in Section 3.]
|
||||||
* transmission [*]
|
* transmission [*]
|
||||||
|
|
||||||
[*] The 4 above starred roles could use improvement, as of 2020-05-17.
|
[*] The 6 above starred roles could use improvement, as of 2020-05-20.
|
||||||
|
|
|
@ -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: Download {{ iiab_download_url }}/{{ phpmyadmin_name_zip }} to {{ downloads_dir }}
|
- name: Download {{ iiab_download_url }}/{{ phpmyadmin_name_zip }} to {{ downloads_dir }}
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ iiab_download_url }}/{{ phpmyadmin_name_zip }}"
|
url: "{{ iiab_download_url }}/{{ phpmyadmin_name_zip }}"
|
||||||
|
@ -49,7 +59,7 @@
|
||||||
template:
|
template:
|
||||||
src: phpmyadmin.j2
|
src: phpmyadmin.j2
|
||||||
dest: "/etc/{{ apache_conf_dir }}/phpmyadmin.conf"
|
dest: "/etc/{{ apache_conf_dir }}/phpmyadmin.conf"
|
||||||
when: apache_install | bool
|
when: apache_installed is defined
|
||||||
|
|
||||||
|
|
||||||
# RECORD phpMyAdmin AS INSTALLED
|
# RECORD phpMyAdmin AS INSTALLED
|
||||||
|
@ -67,11 +77,11 @@
|
||||||
|
|
||||||
- name: Enable phpMyAdmin via Apache, if phpmyadmin_enabled
|
- name: Enable phpMyAdmin via Apache, if phpmyadmin_enabled
|
||||||
command: a2ensite phpmyadmin.conf
|
command: a2ensite phpmyadmin.conf
|
||||||
when: apache_install and phpmyadmin_enabled
|
when: apache_installed is defined and phpmyadmin_enabled
|
||||||
|
|
||||||
- name: Disable phpMyAdmin via Apache, if not phpmyadmin_enabled
|
- name: Disable phpMyAdmin via Apache, if not phpmyadmin_enabled
|
||||||
command: a2dissite phpmyadmin.conf
|
command: a2dissite phpmyadmin.conf
|
||||||
when: apache_install and not phpmyadmin_enabled
|
when: apache_installed is defined and not phpmyadmin_enabled
|
||||||
|
|
||||||
|
|
||||||
- name: Add 'phpmyadmin' variable values to {{ iiab_ini_file }}
|
- name: Add 'phpmyadmin' variable values to {{ iiab_ini_file }}
|
||||||
|
|
Loading…
Reference in a new issue