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

Clean/Explain asterisk.yml & freepbx.yml

This commit is contained in:
root 2021-08-05 22:55:18 -04:00
parent 56519b7fce
commit 776d2d5eb2
2 changed files with 10 additions and 16 deletions

View file

@ -68,12 +68,6 @@
args:
chdir: "{{ asterisk_src_dir }}"
# - name: Asterisk - Set '#define HAVE_SYSTEMD 1' in /opt/iiab/asterisk/include/asterisk/autoconfig.h
# lineinfile:
# path: /opt/iiab/asterisk/include/asterisk/autoconfig.h
# regexp: '#undef HAVE_SYSTEMD'
# line: '#define HAVE_SYSTEMD 1'
- name: Asterisk - Run 'make menuselect.makeopts'
command: make menuselect.makeopts
args:

View file

@ -60,7 +60,7 @@
# 2021-08-05: Asterisk's systemd / systemctl support is getting there but Very
# Imperfect (even when compiled in, as a result of package 'libsystemd-dev' at
# top of asterisk.tml) so let's follow the official instructions for now:
# top of asterisk.tml) so let's follow these "official" instructions for now:
- name: FreePBX - Run 'update-rc.d -f asterisk remove' similar to 'systemctl disable asterisk' giving FreePBX full control during boot - not strictly required but recommended by https://wiki.freepbx.org/display/FOP/Installing+FreePBX+16+on+Debian+10.9
command: update-rc.d -f asterisk remove
@ -134,8 +134,8 @@
- ./start_asterisk start
- ./install -n --webroot {{ freepbx_install_dir }} --dbuser {{ asterisk_db_user }} --dbpass {{ asterisk_db_password }} --dbname {{ asterisk_db_dbname }} --cdrdbname {{ asterisk_db_cdrdbname }}
# - ./start_asterisk stop
# - killall -9 safe_asterisk # 2021-08-05: These 2 lines from PR #2912 attempted a (brute force, not enough?!) workaround to frequent #2908 install
# - killall -9 asterisk # annoyance 'systemctl status freepbx' showing "Unable to run Pre-Asterisk hooks, because Asterisk is already running"
# - killall -9 safe_asterisk # 2021-08-05: These 2 lines from PR #2912 attempted a brute force (not enough!) workaround for the #2908 annoyance on 1st
# - killall -9 asterisk # install, of 'systemctl status freepbx' showing "Unable to run Pre-Asterisk hooks, because Asterisk is already running"
# - /usr/sbin/asterisk -rx "core stop gracefully"
# - name: 'FreePBX - fix file permissions for NGINX: /etc/freepbx.conf (0644), /var/log/asterisk/freepbx.log (0666)'
@ -167,6 +167,13 @@
src: freepbx.service
dest: /etc/systemd/system/
- name: FreePBX - Run 'systemctl restart freepbx' TWICE (THIS IS #1 OF 2) to get past 'systemctl status freepbx' glitch "Unable to run Pre-Asterisk hooks, because Asterisk is already running"
systemd:
daemon_reload: yes
name: freepbx
enabled: yes
state: restarted
- name: FreePBX - Install /etc/apache2/sites-available/freepbx.conf from template ({{ apache_user }}:{{ apache_user }}, 0644 by default)
template:
@ -175,13 +182,6 @@
owner: "{{ apache_user }}" # www-data
group: "{{ apache_user }}"
- name: FreePBX - Run 'systemctl restart freepbx' TWICE (THIS IS #1 OF 2) to get past 'systemctl status freepbx' glitch "Unable to run Pre-Asterisk hooks, because Asterisk is already running"
systemd:
daemon_reload: yes
name: freepbx
enabled: yes
state: restarted
- name: FreePBX - Add directive "Listen {{ pbx_http_port }}" to /etc/apache2/ports.conf
lineinfile:
path: /etc/apache2/ports.conf