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

Merge pull request #2932 from jvonau/apache_service

Apache service
This commit is contained in:
A Holt 2021-08-11 12:37:59 -04:00 committed by GitHub
commit 80cf58ca2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -1,7 +1,8 @@
- name: Stop '{{ apache_service }}' systemd service, in case it exists
- name: Stop & Disable '{{ apache_service }}' systemd service, in case it exists
systemd:
name: "{{ apache_service }}" # apache2 or httpd, per /opt/iiab/iiab/vars/<OS>.yml
state: stopped
enabled: no
ignore_errors: yes
# 'when: apache_installed is defined' insuff b/c mysql's php (etc) can install apache2

View file

@ -25,10 +25,19 @@
command: a2dissite freepbx.conf
when: not pbx_enabled
- name: Restart Apache service ({{ apache_service }})
- name: Restart & Enable '{{ apache_service }}' systemd service, if pbx_enabled
systemd:
name: "{{ apache_service }}" # apache2
state: restarted
enabled: yes
when: pbx_enabled
- name: Stop & Disable '{{ apache_service }}' systemd service, if not pbx_enabled
systemd:
name: "{{ apache_service }}"
state: stopped
enabled: no
when: not pbx_enabled
when: not pbx_try_nginx