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

Reduce Apache dependency in usb_lib & nginx roles

This commit is contained in:
root 2020-05-17 01:06:48 -04:00
parent 333feadba0
commit b1fcec30fe
6 changed files with 39 additions and 23 deletions

View file

@ -2,7 +2,8 @@
systemd:
name: "{{ apache_service }}" # apache2 or httpd, per /opt/iiab/iiab/vars/<OS>.yml
state: stopped
when: apache_installed is defined
ignore_errors: yes
# 'when: apache_installed is defined' insuff b/c mysql's php installs apache2
- name: Install /etc/{{ apache_service }}/ports.conf from template 1 of 2 (ports.conf.j2) if nginx_enabled, to enable Apache port {{ apache_port }} localhost only
template:

View file

@ -1,19 +1,20 @@
# This stanza can likely be removed later in 2020:
- name: 'Remove legacy files if present: /etc/systemd/system/uwsgi.service, {{ nginx_conf_dir }}/usb-lib.conf, {{ nginx_conf_dir }}/modules.conf'
file:
path: "{{ item.path }}"
state: absent
with_items:
- { path: "/etc/systemd/system/uwsgi.service" }
- { path: "{{ nginx_conf_dir }}/usb-lib.conf" }
- { path: "{{ nginx_conf_dir }}/modules.conf" }
#
# - name: 'Remove legacy files if present: /etc/systemd/system/uwsgi.service, {{ nginx_conf_dir }}/usb-lib.conf, {{ nginx_conf_dir }}/modules.conf'
# file:
# path: "{{ item.path }}"
# state: absent
# with_items:
# - { path: "/etc/systemd/system/uwsgi.service" }
# - { path: "{{ nginx_conf_dir }}/usb-lib.conf" }
# - { path: "{{ nginx_conf_dir }}/modules.conf" }
- name: Stop '{{ apache_service }}' systemd service
systemd:
name: "{{ apache_service }}" # apache2 or httpd, per /opt/iiab/iiab/vars/<OS>.yml
state: stopped
when: apache_installed is defined
#ignore_errors: yes
ignore_errors: yes
# 'when: apache_installed is defined' insuff b/c mysql's php installs apache2
- name: Install required and helper packages for NGINX
package: