mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
move APACHE calls to freepbx_enable.yml
This commit is contained in:
parent
028a04a627
commit
ec2ec616b2
2 changed files with 13 additions and 13 deletions
|
@ -124,25 +124,12 @@
|
||||||
group: "{{ apache_user }}"
|
group: "{{ apache_user }}"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- name: FreePBX - Enable http://box:{{ pbx_http_port }} via Apache, if pbx_enabled # http://box:83
|
|
||||||
command: a2ensite freepbx.conf
|
|
||||||
when: apache_installed and pbx_enabled
|
|
||||||
|
|
||||||
- name: FreePBX - Disable http://box:{{ pbx_http_port }} via Apache, if not pbx_enabled # http://box:83
|
|
||||||
command: a2dissite freepbx.conf
|
|
||||||
when: apache_installed and not pbx_enabled
|
|
||||||
|
|
||||||
- name: FreePBX - Add {{ pbx_http_port }} as a Listen directive to apache ports.conf
|
- name: FreePBX - Add {{ pbx_http_port }} as a Listen directive to apache ports.conf
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/apache2/ports.conf
|
path: /etc/apache2/ports.conf
|
||||||
line: "Listen {{ pbx_http_port }}"
|
line: "Listen {{ pbx_http_port }}"
|
||||||
insertafter: Listen 80
|
insertafter: Listen 80
|
||||||
|
|
||||||
- name: FreePBX - Restart Apache service ({{ apache_service }})
|
|
||||||
systemd:
|
|
||||||
name: "{{ apache_service }}" # httpd or apache2
|
|
||||||
state: restarted
|
|
||||||
|
|
||||||
- name: FreePBX - Install /etc/systemd/system/freepbx.service systemd unit file from template
|
- name: FreePBX - Install /etc/systemd/system/freepbx.service systemd unit file from template
|
||||||
template:
|
template:
|
||||||
src: freepbx.service.j2
|
src: freepbx.service.j2
|
||||||
|
|
|
@ -13,3 +13,16 @@
|
||||||
enabled: no
|
enabled: no
|
||||||
state: stopped
|
state: stopped
|
||||||
when: not pbx_enabled
|
when: not pbx_enabled
|
||||||
|
|
||||||
|
- name: FreePBX - Enable http://box:{{ pbx_http_port }} via Apache, if pbx_enabled # http://box:83
|
||||||
|
command: a2ensite freepbx.conf
|
||||||
|
when: pbx_enabled | bool
|
||||||
|
|
||||||
|
- name: FreePBX - Disable http://box:{{ pbx_http_port }} via Apache, if not pbx_enabled # http://box:83
|
||||||
|
command: a2dissite freepbx.conf
|
||||||
|
when: not pbx_enabled
|
||||||
|
|
||||||
|
- name: FreePBX - Restart Apache service ({{ apache_service }})
|
||||||
|
systemd:
|
||||||
|
name: "{{ apache_service }}" # httpd or apache2
|
||||||
|
state: restarted
|
||||||
|
|
Loading…
Reference in a new issue