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

Merge pull request #1990 from holta/apache-modules-upfront

Install common Apache modules in roles/httpd, for {http://box/kiwix, http://box/kolibri, http://box/nodered, etc}
This commit is contained in:
A Holt 2019-10-07 16:19:18 -04:00 committed by GitHub
commit f3ccf6e2f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 15 deletions

View file

@ -77,6 +77,7 @@
group=root group=root
mode=0644 mode=0644
# SEE ALSO THE apache2_module SECTION IN roles/httpd/tasks/main.yml
- name: enable mod_expires for debian - name: enable mod_expires for debian
command: a2enmod expires command: a2enmod expires
when: is_debuntu | bool when: is_debuntu | bool

View file

@ -18,6 +18,7 @@
tags: tags:
- download - download
# SEE ALSO THE apache2_module SECTION IN roles/httpd/tasks/main.yml
- name: Enable cgi execution (debuntu) - name: Enable cgi execution (debuntu)
command: a2enmod cgi command: a2enmod cgi
when: is_debuntu | bool when: is_debuntu | bool

View file

@ -103,12 +103,27 @@
- mpm_prefork.load - mpm_prefork.load
when: is_debuntu | bool when: is_debuntu | bool
- name: 'Turn on mod_proxy using a2enmod with: proxy, proxy_html, headers, rewrite (debuntu)' #- name: 'Turn on mod_proxy using a2enmod with: proxy, proxy_html, headers, rewrite (debuntu)'
command: a2enmod {{ item }} # command: a2enmod {{ item }}
# with_items:
# - proxy
# - proxy_html
# - headers
# - rewrite
# when: is_debuntu | bool
#
# NOTE: activity-server/tasks/main.yml runs "a2enmod expires"
# NOTE: awstats/tasks/install.yml runs "a2enmod cgi"
# NOTE: nodered/tasks/main.yml uses apache2_module to install "proxy_wstunnel"
# 2019-10-07: proxy_http is definitely essential! (ARE THE OTHER 4 BELOW REALLY NEEDED ?)
- name: 'Enable 5 Apache modules, as with "a2enmod" command: headers, proxy, proxy_html, proxy_http, rewrite (for http://box/kiwix, http://box/kolibri, http://box/nodered, etc--if debuntu)'
apache2_module:
name: "{{ item }}"
with_items: with_items:
- headers
- proxy - proxy
- proxy_html - proxy_html
- headers - proxy_http
- rewrite - rewrite
when: is_debuntu | bool when: is_debuntu | bool

View file

@ -71,16 +71,17 @@
# 3. ENABLE MODS FOR APACHE PROXY IF DEBUNTU # 3. ENABLE MODS FOR APACHE PROXY IF DEBUNTU
# 2019-10-07: Moved to roles/httpd/tasks/main.yml
# 2019-09-29: Compare roles/kolibri/defaults/main.yml using just 1 (proxy_http) # 2019-09-29: Compare roles/kolibri/defaults/main.yml using just 1 (proxy_http)
- name: Enable the 4 mods which permit Apache to proxy (debuntu) #- name: Enable the 4 mods which permit Apache to proxy (debuntu)
apache2_module: # apache2_module:
name: "{{ item }}" # name: "{{ item }}"
with_items: # with_items:
- proxy # - proxy
- proxy_html # - proxy_html
- proxy_http # - proxy_http
- rewrite # - rewrite
when: is_debuntu | bool # when: is_debuntu | bool
# 4. CREATE/ENABLE/RESTART (OR DISABLE) KIWIX SERVICE & ITS CRON JOB # 4. CREATE/ENABLE/RESTART (OR DISABLE) KIWIX SERVICE & ITS CRON JOB

View file

@ -105,11 +105,12 @@
when: kolibri_provision | bool when: kolibri_provision | bool
# 2019-10-07: Moved to roles/httpd/tasks/main.yml
# 2019-09-29: roles/kiwix/tasks/kiwix_install.yml installs 4 Apache modules # 2019-09-29: roles/kiwix/tasks/kiwix_install.yml installs 4 Apache modules
# for similar purposes (not all nec?) Only 1 (proxy_http) is needed here. # for similar purposes (not all nec?) Only 1 (proxy_http) is needed here.
- name: Enable Apache module proxy_http for http://box{{ kolibri_url }} # i.e. http://box/kolibri #- name: Enable Apache module proxy_http for http://box{{ kolibri_url }} # i.e. http://box/kolibri
apache2_module: # apache2_module:
name: proxy_http # name: proxy_http
- name: Start 'kolibri' systemd service, if kolibri_enabled - name: Start 'kolibri' systemd service, if kolibri_enabled
systemd: systemd:

View file

@ -186,6 +186,7 @@
state: absent state: absent
when: not nodered_enabled when: not nodered_enabled
# SEE ALSO THE apache2_module SECTION IN roles/httpd/tasks/main.yml
- name: Enable proxy_wstunnel apache2 module - name: Enable proxy_wstunnel apache2 module
apache2_module: apache2_module:
state: present state: present