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

Comments/0-init/NGINX/Apache cleanup

This commit is contained in:
root 2020-05-18 17:33:30 -04:00
parent 6188f30c0a
commit 8efc06a273
4 changed files with 11 additions and 51 deletions

View file

@ -69,28 +69,6 @@
- mpm_prefork.load
when: is_debuntu | bool
# - name: Remove mpm_event.conf & mpm_event.load symlinks, using a2dissite
# command: "a2dissite {{ item }}"
# with_items:
# - mpm_event.conf
# - mpm_event.load
# ignore_errors: yes
#
# - name: Symlink mpm_prefork.conf & mpm_prefork.load, using a2ensite
# command: "a2ensite {{ item }}"
# with_items:
# - mpm_prefork.conf
# - mpm_prefork.load
#- name: 'Turn on mod_proxy using a2enmod with: proxy, proxy_html, headers, rewrite (debuntu)'
# command: a2enmod {{ item }}
# with_items:
# - proxy
# - proxy_html
# - headers
# - rewrite
# when: is_debuntu | bool
- 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 }}"
@ -115,9 +93,9 @@
file:
state: directory
path: "/var/run/{{ apache_user }}"
owner: root
group: root
mode: '0755'
#owner: root
#group: root
#mode: '0755'
- name: 'Create group: admin'
group:
@ -131,13 +109,13 @@
state: present
createhome: no
- name: Create Apache dir /var/log/{{ apache_service }}
- name: Create Apache dir /var/log/{{ apache_service }} ({{ apache_user }}:{{ apache_user }})
file:
state: directory
path: "/var/log/{{ apache_service }}"
owner: "{{ apache_user }}"
group: "{{ apache_user }}"
mode: '0755'
#mode: '0755'
- name: Install Apache's 010-iiab.conf & proxy_ajp.conf into /etc/apache2/sites-available, from templates
@ -156,15 +134,14 @@
# command: a2dissite 010-iiab.conf
# when: not apache_enabled
- debug:
msg: roles/httpd/tasks/homepage.yml will run LATER (invoked by roles/www_options/tasks/main.yml) SO THAT APACHE CAN REDIRECT http://box TO http://box{{ iiab_home_url }} (based on var iiab_home_url)
# - include_tasks: roles/httpd/tasks/homepage.yml
# - name: Enable & Stop '{{ apache_service }}' systemd service
# systemd:
# name: "{{ apache_service }}"
# enabled: yes
# state: stopped
- name: Run 'systemctl daemon-reload'
systemd:
daemon_reload: yes
# RECORD Apache AS INSTALLED

View file

@ -31,12 +31,11 @@
when: apache_installed is undefined
- name: Enable & (Re)Start {{ apache_service }} systemd service, if apache_enabled
- name: Enable & Start-if-nec {{ apache_service }} systemd service, if apache_enabled
systemd:
name: "{{ apache_service }}"
daemon_reload: yes
enabled: yes
state: restarted
state: started # No need to restart, as many IIAB apps do that later
when: apache_enabled | bool
- name: Disable & Stop {{ apache_service }} systemd service, if not apache_enabled