mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Community invite to try flag 'pbx_try_nginx: True'
This commit is contained in:
parent
6d0ae1fe27
commit
d57676dce8
9 changed files with 78 additions and 46 deletions
|
@ -5,13 +5,16 @@
|
||||||
# pbx_install: False
|
# pbx_install: False
|
||||||
# pbx_enabled: False
|
# pbx_enabled: False
|
||||||
|
|
||||||
|
# pbx_try_nginx: False # 2021-08-07: PLEASE TRY NGINX INSTEAD OF APACHE,
|
||||||
|
# # AFTER READING https://github.com/iiab/iiab/issues/2914 AND #2916, THX !
|
||||||
|
|
||||||
# asterisk_chan_dongle: False
|
# asterisk_chan_dongle: False
|
||||||
|
|
||||||
# pbx_signaling_ports_chan_sip: 5160:5161
|
# pbx_signaling_ports_chan_sip: 5160:5161
|
||||||
# pbx_signaling_ports_chan_pjsip: 5060
|
# pbx_signaling_ports_chan_pjsip: 5060
|
||||||
# pbx_data_ports: 10000:20000
|
# pbx_data_ports: 10000:20000
|
||||||
# pbx_http_port: 83
|
# pbx_http_port: 83
|
||||||
#
|
|
||||||
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||||
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
||||||
|
|
||||||
|
|
|
@ -15,19 +15,25 @@
|
||||||
when: not pbx_enabled
|
when: not pbx_enabled
|
||||||
|
|
||||||
|
|
||||||
# - name: Enable http://box:{{ pbx_http_port }}/freepbx via Apache, if pbx_enabled # http://box:83/freepbx
|
- block:
|
||||||
# command: a2ensite freepbx.conf
|
|
||||||
# when: pbx_enabled
|
|
||||||
|
|
||||||
# - name: Disable http://box:{{ pbx_http_port }}/freepbx via Apache, if not pbx_enabled
|
- name: Enable http://box:{{ pbx_http_port }}/freepbx via Apache, if pbx_enabled # http://box:83/freepbx
|
||||||
# command: a2dissite freepbx.conf
|
command: a2ensite freepbx.conf
|
||||||
# when: not pbx_enabled
|
when: pbx_enabled
|
||||||
|
|
||||||
# - name: Restart Apache service ({{ apache_service }})
|
- name: Disable http://box:{{ pbx_http_port }}/freepbx via Apache, if not pbx_enabled
|
||||||
# systemd:
|
command: a2dissite freepbx.conf
|
||||||
# name: "{{ apache_service }}" # apache2
|
when: not pbx_enabled
|
||||||
# state: restarted
|
|
||||||
|
|
||||||
|
- name: Restart Apache service ({{ apache_service }})
|
||||||
|
systemd:
|
||||||
|
name: "{{ apache_service }}" # apache2
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
when: not pbx_try_nginx
|
||||||
|
|
||||||
|
|
||||||
|
- block:
|
||||||
|
|
||||||
- name: Enable http://box/freepbx via NGINX, by installing {{ nginx_conf_dir }}/freepbx-nginx.conf from template
|
- name: Enable http://box/freepbx via NGINX, by installing {{ nginx_conf_dir }}/freepbx-nginx.conf from template
|
||||||
template:
|
template:
|
||||||
|
@ -45,3 +51,5 @@
|
||||||
systemd:
|
systemd:
|
||||||
name: nginx
|
name: nginx
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
when: pbx_try_nginx
|
||||||
|
|
|
@ -201,15 +201,19 @@
|
||||||
# line: "$amp_conf['AMPASTERISKWEBUSER'] = 'www-data';"
|
# line: "$amp_conf['AMPASTERISKWEBUSER'] = 'www-data';"
|
||||||
|
|
||||||
|
|
||||||
# - name: FreePBX - Install /etc/apache2/sites-available/freepbx.conf from template ({{ apache_user }}:{{ apache_user }}, 0644 by default)
|
block:
|
||||||
# template:
|
|
||||||
# src: freepbx.conf.j2
|
|
||||||
# dest: /etc/apache2/sites-available/freepbx.conf
|
|
||||||
# owner: "{{ apache_user }}" # www-data
|
|
||||||
# group: "{{ apache_user }}"
|
|
||||||
|
|
||||||
# - name: FreePBX - Add directive "Listen {{ pbx_http_port }}" to /etc/apache2/ports.conf
|
- name: FreePBX - Install /etc/apache2/sites-available/freepbx.conf from template ({{ apache_user }}:{{ apache_user }}, 0644 by default)
|
||||||
# lineinfile:
|
template:
|
||||||
# path: /etc/apache2/ports.conf
|
src: freepbx.conf.j2
|
||||||
# line: "Listen {{ pbx_http_port }}"
|
dest: /etc/apache2/sites-available/freepbx.conf
|
||||||
# # insertafter: Listen 80
|
owner: "{{ apache_user }}" # www-data
|
||||||
|
group: "{{ apache_user }}"
|
||||||
|
|
||||||
|
- name: FreePBX - Add directive "Listen {{ pbx_http_port }}" to /etc/apache2/ports.conf
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/apache2/ports.conf
|
||||||
|
line: "Listen {{ pbx_http_port }}"
|
||||||
|
# insertafter: Listen 80
|
||||||
|
|
||||||
|
when: not pbx_try_nginx
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- name: FreePBX - Install dependencies (run 'php -m' or 'php -i' to verify PHP modules)
|
- name: FreePBX - Install ~19 dependencies (run 'php -m' or 'php -i' to verify PHP modules)
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- wget
|
- wget
|
||||||
|
@ -24,11 +24,16 @@
|
||||||
- php{{ php_version }}-snmp
|
- php{{ php_version }}-snmp
|
||||||
- php{{ php_version }}-xml # Likewise installed in mediawiki/tasks/install.yml, moodle/tasks/install.yml, nextcloud/tasks/install.yml, wordpress/tasks/install.yml -- AND REGARDLESS dragged in later by Admin Console's use of php-pear for roles/cmdsrv/tasks/main.yml -- run 'php -m | grep -i xml' which in the end shows {libxml, SimpleXML, xml, xmlreader, xmlwriter}
|
- php{{ php_version }}-xml # Likewise installed in mediawiki/tasks/install.yml, moodle/tasks/install.yml, nextcloud/tasks/install.yml, wordpress/tasks/install.yml -- AND REGARDLESS dragged in later by Admin Console's use of php-pear for roles/cmdsrv/tasks/main.yml -- run 'php -m | grep -i xml' which in the end shows {libxml, SimpleXML, xml, xmlreader, xmlwriter}
|
||||||
- php{{ php_version }}-zip # Likewise installed in moodle/tasks/install.yml, nextcloud/tasks/install.yml, wordpress/tasks/install.yml
|
- php{{ php_version }}-zip # Likewise installed in moodle/tasks/install.yml, nextcloud/tasks/install.yml, wordpress/tasks/install.yml
|
||||||
#- libapache2-mod-php
|
|
||||||
#- python-mysqldb # https://github.com/Yannik/ansible-role-freepbx/blob/master/tasks/freepbx.yml#L33
|
#- python-mysqldb # https://github.com/Yannik/ansible-role-freepbx/blob/master/tasks/freepbx.yml#L33
|
||||||
#- libapache2-mpm-itk # To serve FreePBX through a VirtualHost as asterisk user
|
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
|
- name: "FreePBX - Install packages: libapache2-mod-php, libapache2-mpm-itk - if not pbx_try_nginx"
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- libapache2-mod-php
|
||||||
|
- libapache2-mpm-itk # To serve FreePBX through a VirtualHost as asterisk user
|
||||||
|
when: not pbx_try_nginx
|
||||||
|
|
||||||
# For PHP >= 8.0: phpX.Y-json is baked into PHP itself.
|
# For PHP >= 8.0: phpX.Y-json is baked into PHP itself.
|
||||||
# For PHP < 8.0: phpX.Y-json auto-installed by phpX.Y-fpm AND phpX.Y-cli in 3-base-server's nginx/tasks/install.yml, as confirmed by: apt rdepends phpX.Y-json
|
# For PHP < 8.0: phpX.Y-json auto-installed by phpX.Y-fpm AND phpX.Y-cli in 3-base-server's nginx/tasks/install.yml, as confirmed by: apt rdepends phpX.Y-json
|
||||||
#
|
#
|
||||||
|
|
|
@ -22,14 +22,18 @@
|
||||||
# when: nodejs_version != "12.x"
|
# when: nodejs_version != "12.x"
|
||||||
|
|
||||||
|
|
||||||
# - name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
block:
|
||||||
# set_fact:
|
|
||||||
# apache_install: True
|
|
||||||
# apache_enabled: True
|
|
||||||
|
|
||||||
# - name: APACHE - run 'httpd' role
|
- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||||
# include_role:
|
set_fact:
|
||||||
# name: httpd
|
apache_install: True
|
||||||
|
apache_enabled: True
|
||||||
|
|
||||||
|
- name: APACHE - run 'httpd' role
|
||||||
|
include_role:
|
||||||
|
name: httpd
|
||||||
|
|
||||||
|
when: not pbx_try_nginx
|
||||||
|
|
||||||
|
|
||||||
- name: Install Asterisk
|
- name: Install Asterisk
|
||||||
|
|
|
@ -624,6 +624,8 @@ calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529
|
||||||
# If using PBX intensively, investigate nginx_high_php_limits further above.
|
# If using PBX intensively, investigate nginx_high_php_limits further above.
|
||||||
pbx_install: False
|
pbx_install: False
|
||||||
pbx_enabled: False
|
pbx_enabled: False
|
||||||
|
pbx_try_nginx: False # 2021-08-07: PLEASE TRY NGINX INSTEAD OF APACHE,
|
||||||
|
# AFTER READING https://github.com/iiab/iiab/issues/2914 AND #2916, THX !
|
||||||
asterisk_chan_dongle: False
|
asterisk_chan_dongle: False
|
||||||
pbx_signaling_ports_chan_sip: 5160:5161
|
pbx_signaling_ports_chan_sip: 5160:5161
|
||||||
pbx_signaling_ports_chan_pjsip: 5060
|
pbx_signaling_ports_chan_pjsip: 5060
|
||||||
|
|
|
@ -405,4 +405,6 @@ calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529
|
||||||
# If using PBX intensively, investigate nginx_high_php_limits further above.
|
# If using PBX intensively, investigate nginx_high_php_limits further above.
|
||||||
pbx_install: False
|
pbx_install: False
|
||||||
pbx_enabled: False
|
pbx_enabled: False
|
||||||
|
pbx_try_nginx: False # 2021-08-07: PLEASE TRY NGINX INSTEAD OF APACHE,
|
||||||
|
# AFTER READING https://github.com/iiab/iiab/issues/2914 AND #2916, THX !
|
||||||
asterisk_chan_dongle: False
|
asterisk_chan_dongle: False
|
||||||
|
|
|
@ -405,4 +405,6 @@ calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529
|
||||||
# If using PBX intensively, investigate nginx_high_php_limits further above.
|
# If using PBX intensively, investigate nginx_high_php_limits further above.
|
||||||
pbx_install: False
|
pbx_install: False
|
||||||
pbx_enabled: False
|
pbx_enabled: False
|
||||||
|
pbx_try_nginx: False # 2021-08-07: PLEASE TRY NGINX INSTEAD OF APACHE,
|
||||||
|
# AFTER READING https://github.com/iiab/iiab/issues/2914 AND #2916, THX !
|
||||||
asterisk_chan_dongle: False
|
asterisk_chan_dongle: False
|
||||||
|
|
|
@ -405,4 +405,6 @@ calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529
|
||||||
# If using PBX intensively, investigate nginx_high_php_limits further above.
|
# If using PBX intensively, investigate nginx_high_php_limits further above.
|
||||||
pbx_install: False
|
pbx_install: False
|
||||||
pbx_enabled: False
|
pbx_enabled: False
|
||||||
|
pbx_try_nginx: False # 2021-08-07: PLEASE TRY NGINX INSTEAD OF APACHE,
|
||||||
|
# AFTER READING https://github.com/iiab/iiab/issues/2914 AND #2916, THX !
|
||||||
asterisk_chan_dongle: False
|
asterisk_chan_dongle: False
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue