1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-14 20:22:08 +00:00

Reduce dependency on Apache in nginx/tasks/enable-or-disable.yml

This commit is contained in:
root 2020-05-16 20:40:01 -04:00
parent a0a3b01c44
commit 52e8d30f00

View file

@ -1,7 +1,8 @@
- name: Ensure that Apache (({{ apache_service }})) is not running -- we may need port swap
- name: Ensure that Apache ({{ apache_service }}) is not running -- we may need port swap
systemd:
name: "{{ apache_service }}" # apache2 or httpd, per /opt/iiab/iiab/vars/<OS>.yml
state: stopped
when: apache_installed is defined
- 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:
@ -21,7 +22,7 @@
daemon_reload: yes
state: restarted
enabled: true
when: apache_enabled or not nginx_enabled
when: apache_installed is defined and apache_enabled # or not nginx_enabled
- name: Enable & (Re)Start 'nginx' systemd service, if nginx_enabled