mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
More FreePBX fixes
This commit is contained in:
parent
490812e6a5
commit
1bd780eabe
3 changed files with 19 additions and 15 deletions
|
@ -15,3 +15,4 @@ asterisk_db_cdrdbname: asteriskcdrdb
|
||||||
freepbx_url: http://mirror.freepbx.org/modules/packages/freepbx/
|
freepbx_url: http://mirror.freepbx.org/modules/packages/freepbx/
|
||||||
freepbx_src_file: freepbx-15.0-latest.tgz
|
freepbx_src_file: freepbx-15.0-latest.tgz
|
||||||
freepbx_src_dir: /opt/iiab/freepbx
|
freepbx_src_dir: /opt/iiab/freepbx
|
||||||
|
libodbc_path: ""
|
||||||
|
|
|
@ -63,12 +63,12 @@
|
||||||
enabled: no
|
enabled: no
|
||||||
state: stopped
|
state: stopped
|
||||||
|
|
||||||
# using named groups due to this: http://www.handverdrahtet.org/2016/01/ansible-using-numbered-backreference.html
|
## using named groups due to this: http://www.handverdrahtet.org/2016/01/ansible-using-numbered-backreference.html
|
||||||
- name: FreePBX - Enable freepbx installation with remote mysql db
|
#- name: Enable freepbx installation with remote mysql db
|
||||||
replace:
|
# replace:
|
||||||
dest: "{{ freepbx_src_dir }}/installlib/installcommand.class.php"
|
# dest: '{{ freepbx_src_dir }}/installlib/installcommand.class.php'
|
||||||
regexp: "(?P<firstpart>\$amp_conf\[.AMPDBHOST.\] = .)localhost(.;)"
|
# regexp: '(?P<firstpart>\$amp_conf\[.AMPDBHOST.\] = .)localhost(.;)'
|
||||||
replace: "\g<firstpart>{{ asterisk_db_host }}\2"
|
# replace: '\g<firstpart>{{ asterisk_db_host }}\2'
|
||||||
|
|
||||||
- name: Don't let freepbx take over the php sessions dir
|
- name: Don't let freepbx take over the php sessions dir
|
||||||
blockinfile:
|
blockinfile:
|
||||||
|
@ -84,15 +84,20 @@
|
||||||
- name: Install freepbx (just ran once)
|
- name: Install freepbx (just ran once)
|
||||||
command: "{{ item }}"
|
command: "{{ item }}"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ freepbx_src_dir }}/freepbx"
|
chdir: "{{ freepbx_src_dir }}"
|
||||||
creates: /var/www/freepbx
|
creates: /var/www/freepbx
|
||||||
with_items:
|
with_items:
|
||||||
- ./start_asterisk start
|
- ./start_asterisk start
|
||||||
- ./install -n --webroot /var/www/freepbx --dbuser {{ asterisk_db_user }} --dbpass {{ asterisk_db_password }} --dbname {{ asterisk_db_dbname }} --cdrdbname {{ asterisk_db_cdrdbname }}
|
- ./install -n --webroot /var/www/freepbx --dbuser {{ asterisk_db_user }} --dbpass {{ asterisk_db_password }} --dbname {{ asterisk_db_dbname }} --cdrdbname {{ asterisk_db_cdrdbname }}
|
||||||
register: freepbx_installation
|
register: freepbx_installation
|
||||||
|
|
||||||
- name: Install systemd freepbx service
|
- name: Install unit file /etc/systemd/system/freepbx.service from templates
|
||||||
copy: src=freepbx.service.j2 dest=/etc/systemd/system/freepbx.service mode=755
|
template:
|
||||||
|
src: "freepbx.service.j2"
|
||||||
|
dest: "/etc/systemd/system/freepbx.service"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
# http://community.freepbx.org/t/fixing-cdr-cel-on-ubuntu-debian-installation/30836
|
# http://community.freepbx.org/t/fixing-cdr-cel-on-ubuntu-debian-installation/30836
|
||||||
# Test using `isql -v MySQL-asteriskcdrdb`
|
# Test using `isql -v MySQL-asteriskcdrdb`
|
||||||
|
@ -106,14 +111,12 @@
|
||||||
Description = ODBC for MySQL
|
Description = ODBC for MySQL
|
||||||
Driver = {{ libodbc_path }}
|
Driver = {{ libodbc_path }}
|
||||||
FileUsage = 1
|
FileUsage = 1
|
||||||
notify: Reload asterisk modules
|
|
||||||
|
|
||||||
- name: Fix asterisk cdr odbc connection (2)
|
- name: Fix asterisk cdr odbc connection (2)
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/odbc.ini
|
dest: /etc/odbc.ini
|
||||||
regexp: /var/lib/mysql/mysql.sock
|
regexp: /var/lib/mysql/mysql.sock
|
||||||
replace: /var/run/mysqld/mysqld.sock
|
replace: /var/run/mysqld/mysqld.sock
|
||||||
notify: Reload asterisk modules
|
|
||||||
|
|
||||||
- name: Install freepbx modules
|
- name: Install freepbx modules
|
||||||
command: "fwconsole ma downloadinstall {{ item }}"
|
command: "fwconsole ma downloadinstall {{ item }}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue