1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/pbx/tasks/main.yml

48 lines
2.1 KiB
YAML
Raw Normal View History

2019-01-19 15:44:59 +00:00
- name: Fail if nodejs_version is incorrect
2019-02-09 19:12:32 +00:00
fail:
2019-02-09 20:07:39 +00:00
msg: >-
2019-02-09 19:12:32 +00:00
PBX: Refusing to install as nodejs_version is not 10.x. Please fix that
(looking into /etc/iiab/local_vars.yml and
/opt/iiab/iiab/vars/default_vars.yml) and then rerun.
when: pbx_install and (nodejs_version != "10.x")
#- name: TODO: Check if asterisk and freepbx are already installed
2019-02-09 20:37:13 +00:00
- debug: # Crazy spacing below is tuned for 80-column screens
2019-02-09 20:07:39 +00:00
msg: >-
2019-02-09 20:41:10 +00:00
####################################################################WARNING:
2019-02-12 15:12:50 +00:00
ONLY UBUNTU 18.04, DEBIAN 9 & RASPBIAN ARE SUPPORTED AS OF FEB 2019. Please
2019-02-09 20:45:40 +00:00
assist Internet-in-a-Box communities worldwide if you can make
Asterisk and FreePBX work on other OS's / distros, Thank
2019-02-09 20:46:39 +00:00
You! http://FAQ.IIAB.IO ###############################################################################
2019-02-09 19:12:32 +00:00
- name: Check if freepbx is already installed
stat:
path: /etc/systemd/system/freepbx.service
register: freepbx_installed
- debug:
msg: >-
FreePBX already installed. Reinstall shall be skipped
when: freepbx_installed.stat.exists
2019-02-09 19:12:32 +00:00
- name: Install Asterisk (debuntu)
include_tasks: asterisk.yml
when: internet_available and pbx_install and (not pbx_installed) and is_debuntu and (not freepbx_installed.stat.exists)
2019-02-09 19:12:32 +00:00
#when: internet_available and pbx_install and (not pbx_installed) and ((is_debian and ansible_distribution_major_version == "9") or is_ubuntu_18)
2019-02-09 19:44:16 +00:00
- name: Install FreePBX (debuntu)
include_tasks: freepbx.yml
when: internet_available and pbx_install and (not pbx_installed) and is_debuntu and (not freepbx_installed.stat.exists)
#when: internet_available and pbx_install and (not pbx_installed) and ((is_debian and ansible_distribution_major_version == "9") or is_ubuntu_18)
- name: Enable FreePBX (debuntu)
include_tasks: freepbx_enable.yml
2019-02-09 19:12:32 +00:00
when: internet_available and pbx_install and (not pbx_installed) and is_debuntu
#when: internet_available and pbx_install and (not pbx_installed) and ((is_debian and ansible_distribution_major_version == "9") or is_ubuntu_18)
- name: Asterisk - Install chan_dongle
include: chan_dongle.yml
when: asterisk_chan_dongle | bool